Expand my Community achievements bar.

SOLVED

New Form Question

Avatar

Level 4

I have three offices which has three different addresses, phone numbers, fax numbers, etc. At this time on my new form users have to choose a drop down box for each for the address, zip, fax, city state, etc. Is there a way for me to have one drop down box to choose office A, office B, or office C & if they choose Office B the address, zip, city, state, etc will automatically populate in the correct fields & if they choose Office A the same thing will happen?

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

You have to be mindful of case sensitivity when referencing objects. You have Page1 and Subform1 while the assignment expressions were looking for

'form1.page1.subform1".

Steve

View solution in original post

5 Replies

Avatar

Former Community Member

Yes. Something like this on the exit event of the drop-down works...

// form1.page1.subform1.office::exit - (JavaScript, client)

var office = this.rawValue;

switch (office) {

  case "123":

    form1.page1.subform1.street.rawValue = "345 Park Avenue";

    form1.page1.subform1.city.rawValue = "San Jose";

    form1.page1.subform1.state.rawValue = "CA";

    form1.page1.subform1.zip.rawValue = "95110";

    break;

  case "456":

    form1.page1.subform1.street.rawValue = "601 Townsend Street";

    form1.page1.subform1.city.rawValue = "San Francisco";

    form1.page1.subform1.state.rawValue = "CA";

    form1.page1.subform1.zip.rawValue = "94103";

    break;

  default:

    break;

}

Steve

Avatar

Level 4

It still is not working on my form....how can I upload my form so you can look at the code?

Avatar

Former Community Member

Send the form to stwalker.adobe@gmail.com.

Steve

Avatar

Level 4

Thanks, I just sent it to the email address. It is attached as 2222222.pdf

Avatar

Correct answer by
Former Community Member

You have to be mindful of case sensitivity when referencing objects. You have Page1 and Subform1 while the assignment expressions were looking for

'form1.page1.subform1".

Steve

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] ----