Hi,
I am designing a forms implementation where we want to configure fields (such as an email address) once and share them across multiple forms.
The reason for this, is to control the functionality of fields (validation, max characters, consistent dropdown options ) etc, but allow authors to create forms using these pre-prepared fields. Fragments are (nearly) perfect for this, however there is one short coming that I need a solution for.
I want to be able to vary certain settings on a per form basis.
Let's focus on one attribute for now, the "title" which is used as the label for the field.
The fragment settings for the email address title is "Email Address"
On form A - I would like the title to be "Contact Email Address"
On form B - I would like the title to be "Business Email Address"
I have overridden the guideField and figured I could lookup the container (the fragment panel) and use the title from that.
However, the parent of the field when it is being rendered is the fragment rootpanel and not the target form where the fragment is used (e.g. Form A and Form B).
Is there an alternative solution to override the title on a form by form basis? I could use cq:templates to define the fields however once the forms are authored any changes would have to be made across all forms (not centrally).
Is there perhaps a different way to centrally store settings for a field with the ability to override values?
Thanks,
James
Solved! Go to Solution.
Views
Replies
Total Likes
I created a solution to this problem:
- if the flag is set - uses the request origin (from getRequestURI) to apply any overrides.
Views
Replies
Total Likes
I created a solution to this problem:
- if the flag is set - uses the request origin (from getRequestURI) to apply any overrides.
Views
Replies
Total Likes