Section template xbl component

classic Classic list List threaded Threaded
6 messages Options
vbr
Reply | Threaded
Open this post in threaded view
|

Section template xbl component

vbr
Hello,

I read in the documentation (https://doc.orbeon.com/form-builder/section-templates.html) that's it now possible to create a section template and reusing it in other forms. In my case, I would like to create a XBL section template component. This component will group several fields (in my case streetName, streetNumber, city and others). Is it possible? How? Thank you for your help.

Reply | Threaded
Open this post in threaded view
|

Re: Section template xbl component

Alessandro  Vernet
Administrator
Hi,

What do you mean by "create an XBL section template"?

"Behind the scene", when you create a section template in Form Builder, an XBL component gets created, which encapsulates the controls in the section, the "data model" for that section, possible validations, calculations, etc for that section, as well as services and actions. However, from a form author's perspective (i.e. user of Form Builder), this is more of an "implementation detail".

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
vbr
Reply | Threaded
Open this post in threaded view
|

Re: Section template xbl component

vbr
By section xbl component, I mean an XBL component that will contains several fields.

In my case I would like to create an XBL component "Address" with 4 fields : StreetName, StreetNumber, PostalCode and City. The value for StreetName will be retrieve from an Http service and others will depend on the value of streetName.

I don't know if is it possible. What I would like is that when I click on my component in the Form Builder, 4 fields are added to the form. See my print screen here :




Another question, is it possible to define directly in XBL component localized alert message? For example if the value typed by the user is not correct I would set my field as invalid and display an error message below the field?


Thank you for your help!
Reply | Threaded
Open this post in threaded view
|

Re: Section template xbl component

Alessandro  Vernet
Administrator
Controls, including those implemented in XBL, are placed in the cell of a grid by Orbeon Forms. You could create an XBL control that contains, say, multiple input fields, as shown in your screenshot, and then add it in a grid with 1 column. (Or maybe 2; but if your grid has too many columns, this won't leave enough space for the input fields in your XBL control.)

However, what you are showing in this screenshot can be done just with the section template feature, which works right out of Form Builder. Is this something that you could use in your case, instead of writing a custom XBL control by hand?

https://doc.orbeon.com/form-builder/section-templates.html

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
vbr
Reply | Threaded
Open this post in threaded view
|

Re: Section template xbl component

vbr
Is this possible that my component is inserted as a grid by Orbeon Form Builder?

With section template, the problem is that it creates always a new section. I prefer that my component is inserted as a grid.
Reply | Threaded
Open this post in threaded view
|

Re: Section template xbl component

Alessandro  Vernet
Administrator
Form Builder currently doesn't support adding a custom component as a grid. Not that this wouldn't be possible, since the grid is itself an XBL component, just that it isn't supported right now.

And I understand that in some cases you'd indeed like the "section template" to come without a title. If your organization has a PE or Dev Support subscription, I'd encourage you to get in touch with us to have these things implemented as sponsored features, as this might not represent a huge amount of work.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet