How to use a form text component multiple times through CRX DE in CQ5 - aem

I want to add a form text component multiple times in a page and give different id's to them in CQ5.

The default form text component doesn't provide option to specify an id, rather it generates one itself.
The id that is generated is the formId_elementName, where formId is the id of the form which is present in the form start component(defaults to "new_form") and the elementName is the value that is provided in the Element Name field of the form text component.
But, in case you would like to provide the authors, the ability to add their own id's to the form start component, then one possible way would be to override the default form text component.
Add an additional field to the dialog box of the form text component called id and use that value in the jsp as id for the input field. But be cautious when providing this functionality, as the authors may forget to update the id fields appropriately, there by resulting in many text fields having the same id.

Related

How do we POST custom fields from multiple categories in Workfront

I have two custom forms A1,A2,A3 and fields a1,a2,a3 in the forms respectively. I want to create a new project with custom fields from the forms A1, A2. How should we include multiple categoryID in the POST URL
/attask/api/v10.0/PROJ?fields=parameterValues&name=XXX&DE:a1=hello&DE:a2=hello1&categoryID=<A1/A2 category ID - How should i fill it.>
I tried adding this paramter but no luck categoryIDs=5d10971f0022b132ec67f6fb6c60b3a4,5d07244000060f86c04b49527f1
I got the following error "message": "APIModel V10_0 does not support field categoryIDs (Project)"
If you attempt to set a custom field value on an object that does not yet have that field associated to it (no form on the object that contains the field), Workfront will automatically attach an appropriate form. If those forms are the only ones that utilize your fields, you should be able to simply set the field values and be done with it.
However, if you wish to attach specific custom forms without filling out the fields, or if you have a field associated with multiple forms and you want to ensure a specific form is attached, you must first attach the form(s) in one call and then update the fields in another.
To attach a custom form,
PUT <Workfront URL.../<objectID?updates={objectCategories:[{categoryID:`"<custom form ID>`",categoryOrder:<order of form, starting with 0>,objCode:`"CTGY`"}]}
Please note that this will remove any forms not explicitly specified in this call (it does not append) so you'll need to capture any existing forms and re-apply them.
Below API call worked
POST <Workfront URL.../<object>?updates={objectCategories:[{categoryID:`"<custom form ID1>`",categoryOrder:<order of form, starting with 0>,objCode:`"CTGY`"},{categoryID:`"<custom form ID2>`",categoryOrder:<order of form, starting with 0>,objCode:`"CTGY`"}]],name:"`<object_name>`", DE:a1:"hello", DE:a2:"hello1"}

Repeatable Form elements

I need to allow the users repeat some of the form fields(or form groups) in the survey forms. There should be a + or - button next to the field that if the user clicks on +, then a new field is created.
Example: https://www.rhyzz.com/repeatable-fields.html
I would be surprised to know if Qualtrics doesn't have this feature.
I google for this but no success.
You can't create new fields (choices, answers, variables, etc.) on the fly in Qualtrics. A field has to be defined in the survey for it be be saved in the response data.
You could write a JavaScript to show and hide fields to give the appearance of adding and removing fields, but you would have to define the maximum number of fields in the survey beforehand.

Adobe Acrobat form fields are all auto completing

In Acrobat preference I have auto complete turned off.
When I fill in one form field, all of the other form fields are filled in too with the same word?
So if I enter 'hello' into one field all the other form fields on the questionnaire get the value 'hello'.
I copied and pasted the form fields for each question to save time, surely that doesn't mean each form field in the questionnaire is just one form field, or does it?
How can I separate each form field so it can hold its own answer?
I found an answer to my question.
Fields with the same name will automatically get the same value, so each form field needs a different name.
If you create one form field, then right click on the form field in the menu on the right and choose 'place multiple fields', you can then input how many fields you want for the form along with other options. Acrobat then names each form field separately for you.

Why can't magento accept `content` as a database field name?

I am creating a new module and in that module I add a form which has a field name content in the database.
Now when I add a wyswig editor in this form with the field name content in the database, the layout of the form in the backend changes completely as compared to default layout.
But when I changed the database field name from content to any other name lets say content_html or content_h etc etc., the layout of the form now appeared as a default form.
This happens only when I use wyswig editor, and without wyswig if I create simple form it accepts the values in the database under the content field name.
Why can't magento accept the content as a field name, using wyswig editor.
the problem is that magento sets the id of the element to same as the name and the id
content is already present:
<div class="main-col" id="content">
try to set a prefix to your for your form
$form->setHtmlIdPrefix('something_')
that should fix it

Popup window for complex structured data in an extjs form field

I need to build the following form field. Let's take the case where in a form I have multiple fields. Two of them are "last name" and "first name". Instead of the classic way when these field will show seperatley I want a single fields thatt shows when completed like a text field with value a concatenqtion of e two values ( ie "michael jackson"). When I click on the field an window (like a picker date) will popup haing a form with the two fields.
Unfortunately i do not know where to start from:
what class should I derive
how should I store the value in the form ( two hidden values or just a serialized value of the fields).
I might have complex structure with 5-6 fields in this picker popup.
I would extend Ext.form.field.Picker. In the createPicker() method you can crate whatever combination of fields an components that you want.
Re: storage of data, I'd serialze the values in the one field. Then you can treat reads and commits in the same way (and you can always manipulate the data later.
Here's an example that I did a while back: jsfiddle.net/existdissolve/wMcQk/