Section template

16 views
Skip to first unread message

MANISH

unread,
Jan 8, 2020, 10:19:36 PM1/8/20
to Orbeon Forms
Hi Alex - I have a scenario where I will be using same hidden section on all the forms in an app. So, I'm using a section template for this. This section template will have the form metadata which either comes from the headers or a service. 

Published this section template and created a form where I added it from the library. If the metadata section template is not hidden in the new form I created, then I can see all the metadata values in the database and if it is hidden db stores empty/null values. Attached form and section template

Is this how section templates are intended to work? Can I not hide the section templates whose fields are updated dynamically?

Is there a workaround or do we have to hide it using css?




Thanks
Manish




form
section template

Alessandro Vernet

unread,
Jan 10, 2020, 7:50:39 PM1/10/20
to orb...@googlegroups.com
Hi Manish,

Indeed, if the section template isn't visible, it doesn't "run". As a
workaround, you could merge the section template into the form, and it will
then behave like a regular section. The downside is that if the section
template is changed in the library after it is merged, changes to the
section template won't be reflected in the form. You'll let me know if this
technique works for you.

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

MANISH

unread,
Jan 22, 2020, 10:13:48 PM1/22/20
to Orbeon Forms
Thanks Alex but that is not what i'm looking for. 

Also, can we have multiple section templates in an app?

Alessandro Vernet

unread,
Jan 23, 2020, 2:42:25 PM1/23/20
to orb...@googlegroups.com
Hi Manish,

You are saying "that is not what i'm looking for": did I misunderstand your
original question? If so, could you clarify what you are looking for?

> Also, can we have multiple section templates in an app?

Yes. And this by just having multiple top-level sections in your app/library
form; each top-level section will be available as a section template.

MANISH

unread,
Jan 30, 2020, 1:39:17 AM1/30/20
to Orbeon Forms
Thanks Alex for the info.

As mentioned in the initial question I require the section template to be able to pull and store the values while the section template is hidden in the form.

This will be an added advantage to tag metadata using a section template for the required forms. Current version does not support it. 

Merging the section template would not update section templates so this is not useful in our case.

Alessandro Vernet

unread,
Jan 31, 2020, 2:28:05 PM1/31/20
to orb...@googlegroups.com
Hi Manish,

If merging doesn't work for you, another workaround would be to:

1. Hide the section template with CSS (in Form Builder, in the Section
Settings dialog put a custom CSS class, and in your own CSS make elements
with the class `display: none`).
2. In the library, make all the controls in section readonly (so users won't
be able to change their value by overriding your CSS).

Would something like this work for you?

Alessandro Vernet

unread,
Feb 7, 2020, 1:03:51 PM2/7/20
to orb...@googlegroups.com
Hi Manish, did you get a chance to try using CSS to hide the section
template, so the calculation would still run? If so, did that work for you?
Reply all
Reply to author
Forward
0 new messages