JS – how to refer to a field in the code

Home Forums Modern DFFS JS – how to refer to a field in the code

Viewing 2 reply threads
  • Author
    Posts
    • #37410
      Wendi Watson
      Participant

        Hi Alexander,

        When someone submits a new or edit form I want to look at a certain field and find the character “;” and replace it with “; “. I have Javascript code that can do this but I am not clear on how to target this to a specific field in the form. Are you able to provide me some guidance on this?

        Thank you!

      • #37411
        Alexander Bautz
        Keymaster

          Hi,
          If you look at this thread and find the Do something before the item is saved section you can just use getFieldValue(“Your_field_name”) to get the value to build your new variable with the changes, and setFieldValue(“Your_field_name”, your_variable); to write it back to the field.

          Alexander

        • #37416
          Marcus Khoo
          Participant

            Wendi,
            Also note that this works great for Lookup fields. So
            getFieldValue(“your_field_name”);
            returns the VALUE in the field not just the ID of the item being looked up.

        Viewing 2 reply threads
        • You must be logged in to reply to this topic.