How-To: Stop items defined by a Lagan E-Form from appearing in your Cloudoko Form
Occasionally you may wish to stop items defined in your Lagan E-Form from being shown on your Cloudoko Form.
To Exclude Or To Hide?
Cloudoko Forms offers you two directives that you can apply to your Lagan E-Form XML that enable you to remove items from your web form:
<Appearance>cloudoko-exclude</Appearance>
and...
<Appearance>cloudoko-hide</Appearance>
Which Directive Should I Use?
There's no right or wrong answer about which is the best approach to use, but use the following rough guide to help you choose one:
Use cloudoko-exclude when you want no record of the item in the HTML markup to be rendered by Cloudoko Forms to the browser.
Use cloudoko-hide when you want Cloudoko Forms to use CSS Visibility to make the item "disappear" but still keep it in the HTML markup.
This is important if you have JavaScript code running on your page which expects to have access to a particular <Field> which you have now hidden.
It's also useful if you have a <Field> in your E-Form that contains a <Default> value - but showing that field to the customer would makes no sense on the Cloudoko version of the form. If you still want to ensure that the data in your Lagan <Field> is filled with the <Default> value, you should use cloudoko-hide as well.
So as a general rule, you're best to use cloudoko-exclude. Unless you know that you're dealing with a <Field> and it needs to be still available to functions running on the page, or has a default value which must still be populated, in which case use cloudoko-hide.
What Items Can I Apply These Directives To?
Directive | Description | Valid For Use On <Appearance> Tags Inside... | |||
---|---|---|---|---|---|
<Page> | <Group> | <Line> | <Field> | ||
cloudoko-exclude | Will stop the affected item from being rendered by Cloudoko Forms full stop. | Yes | Yes | Yes | Yes |
cloudoko-hide | Will still render the item, but use CSS trickery to hide it on the page. | NO | Yes | Yes | Yes |