Skip to main content
Participant
May 27, 2023
Question

Assign values in a dropdown menu

  • May 27, 2023
  • 1 reply
  • 858 views

I am creating a form.  In the fillable form, I want to create a dropdown field with the choices of adult or child.  For those choices, I want to assign the value $25 or $15 and populate the value to a field "Amount" based on which option was selected (adult or child).  

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
May 27, 2023

Set values as 'export values' of choices in dropdown.

To set export value go to dropdown field properties, then click on 'Options' tab, where it says 'export value' enter $25 for 'adult' choice and $15 for 'child' choice, now click on 'Calculate' tab and select 'Custom calculation script' and paste this:

this.getField("Amount").value = event.value;

 

Participant
May 29, 2023

I can't paste it for some reason but when I type it in, it doesn't work.

Participant
May 29, 2023

Nesa,

My Amount field is named AmountRow1.  I think that may be the issue.  I am not sure.  Also, I would like to create a field that would give me the total number of adults and children that are registered.