g_form.setValue not populating my fields on catalog item

denisdoucet
Tera Guru

Hoping somebody can help me figure this out.
I'm creating a form where the user can create a new vendor where they need to fill out a handful of mandatory fields.
Once created, they need to select if the their contract will take place at the same office or not.
This is essentially the same concept of filling out your address and then having a checkbox to confirm if your billing address is the same and will self-populate if you check yes.

Per my alerts I'm getting into the 'if' statement and my values seem to be generating within the statement.
However, when the info is not getting generated on my form, they're simply showing as blank and mandatory. Which is essentially what would happen if they selected 'No' instead of 'Yes' in the Contract location is the same as above' field.

 find_real_file.png

 

 find_real_file.pngfind_real_file.png

 

find_real_file.png

1 ACCEPTED SOLUTION

denisdoucet
Tera Guru

Finally figured this one out.
Strange enough, it ended up being a UI policy that simply controlled the visibility of of that particular section.
I tried changing the order of the UI policy and the client script but I couldn't come to any combination between the two that worked for some reason.

I ended up controlling the visibility of that section with a UI policy centered around a different field/condition.

Thank you everybody that took the time to assist/help!

 

View solution in original post

16 REPLIES 16

denisdoucet
Tera Guru

Finally figured this one out.
Strange enough, it ended up being a UI policy that simply controlled the visibility of of that particular section.
I tried changing the order of the UI policy and the client script but I couldn't come to any combination between the two that worked for some reason.

I ended up controlling the visibility of that section with a UI policy centered around a different field/condition.

Thank you everybody that took the time to assist/help!

 

And don't forget to mark any response as "Helpful".