Set Field Value using JS

Home Forums Modern DFFS Set Field Value using JS

Viewing 3 reply threads
  • Author
    Posts
    • #36458
      William Summers
      Participant

        I have a challenge where our azure ad attributes as well as our user profile is returning values we need but surrounded by gibberish. I can remove the gibberish with JS but i am unable to set a field value using a function in the new modern dffs using the ID of the field.

        I have used something like this and a lot of variants.
        document.getElementById(“TextField219”).value = “your_value”;

        Any direction would be greatly appreciated!

      • #36461
        Alexander Bautz
        Keymaster

          The Modern DFFS version is built using the REACT framework and you cannot set the value directly in the textfield.

          Use a function like this:

          setFieldValue("Your_field_internal_name", "the_value");
          

          Alexander

        • #36474
          William Summers
          Participant

            ok so this is a duh moment. apologies for wasting your time… of course that works fine. Thank you good sir.

          • #36477
            Alexander Bautz
            Keymaster

              No problem, I’m glad it worked out.

              Alexander

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