Combo Box to Pre-populate Form Fields - error when using space between the "ID"

New Here ,
Mar 29, 2022 Mar 29, 2022

Copy link to clipboard

Copied

Hello everyone, i hope i can get some answers from the gurus in this forum.

 

I have managed to make an Combo box who pre-populate form fields, with copying a tutorial. 

But when i add space between the "id" from the dropdownmenu i getting error message: "SyntaxError: Missing : after property ID"

 

Can anyone please help me with this issue? 

 

The code in the jacascript who gets the error:

var DeptData = { CSS Frogner:{ adresse: "Frederik Stangs Gate 4",
poststed: "0272 Oslo", },

 

And the code without any error:

var DeptData = { Frogner:{ adresse: "Frederik Stangs Gate 4",
poststed: "0272 Oslo", },

 

The custom keystroke (if that is to any help):

if( event.willCommit )
{
if(event.value == " ")
this.resetForm(["Adresse","Poststed"]);
else
SetFieldValues(event.value);
}

 

Hope someone can help me. 

 

Best regards

Newbie to jacascripting

 

TOPICS
JavaScript , PDF forms

Views

54

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Mar 29, 2022 Mar 29, 2022

Use "CSS Frogner"

Likes

Translate

Translate
Adobe Community Professional ,
Mar 29, 2022 Mar 29, 2022

Copy link to clipboard

Copied

Use "CSS Frogner"

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 29, 2022 Mar 29, 2022

Copy link to clipboard

Copied

LATEST

Thank you, that worked perfectly!

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines