How to prevent elements from being output

107 Views Asked by At

I'm trying to create a form with quickform (default in the company).
This form is multipart but on 1 page.
I combine it with the sigma templating system.

The idea of the page is:

|-----------------------|<br>
|        header         |<br>
|-----------------------|<br>
|    content top        |<br>
|-----------------------|<br>
|first part of the form |<br>
|-----------------------|<br>
|second part of the form|<br>
|-----------------------|<br>
|        footer         |<br>
|-----------------------|

Now i have created this layout. But i have a problem with the form.
This form should be devided in the 2 pieces. But quickform doesn't support that.
I decided to write the top part of the form as a normal part of my template with those elements also available in quickform. (array with the id's which i also use to render the form).

Now comes the problem.
How do i prevent quickform/sigma from outputting the form elements?.

<!-- BEGIN qf_checkbox -->{qf_element}<!-- END qf_checkbox --> This works but outputs them,
<!-- BEGIN qf_checkbox --><!-- END qf_checkbox --> This doesn't work.

Greets, Erik

2

There are 2 best solutions below

0
On BEST ANSWER

I solved it by just creating a seperate element just for the top form. It has all the properties from the qf_checkbox, and someother stuff that could be usefull.

That way, i didn't have to create hidden inputs or other hacks. I just show the top form with those extended checkboxes, and the bottom checkboxes are normal checkboxes. problem Sloved :).

1
On

I'm not familiar with that template system, but I would suggest you look at it's manual for some conditional functionalities. But anyway ... a simple workaround should be to just set the values to be NULLs or empty strings, so even if it outputs them there wouldn't be anything to actually display.