Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

How Do I: Auto-populate other areas of form from text field?

Avatar

Level 2

Hello. Need help please!

I need to input a script I guess for a user-entered text-field to auto-populate in the headers of the form.  The header is identified by whatever the name the user will enter on the cover page.

Id be very grateful.

Stephanie.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

If you name the field in the header exactly the same as the text field then you merely have to set the binding to global and no script is neccessary. You can set the binding on the Object palette in the Binding tab. Then on the default binding dropdown choose global.

Paul

View solution in original post

4 Replies

Avatar

Correct answer by
Former Community Member

If you name the field in the header exactly the same as the text field then you merely have to set the binding to global and no script is neccessary. You can set the binding on the Object palette in the Binding tab. Then on the default binding dropdown choose global.

Paul

Avatar

Level 2

Going back to this question.  This works fine but there is one section on my form that if I name them all the same, then I cannot select indivual check boxes because they will now all check.

If the user answers N/a this works great as they all check off.

If the user selects Yes.  and fills out a couple fields.  he needs to be able to n/a some of the other fields.

I guess global is not the answer for this particular problem?

Avatar

Level 7

For mutually exclusive checkboxes you could use a script like this:

if (this.rawValue == 1){

     checkbox2.rawValue = 0;

     checkbox3.rawValue = 0;

}

This script would be placed on the click event of checkbox1 using javascript as the language. The script for checkbox2 would be:

if (this.rawValue == 1){

     checkbox1.rawValue = 0;

     checkbox3.rawValue = 0;

}

and so on down the line for however many checkboxes that are mutually exclusive.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----