Hidden Field Default Value

Forums Classic DFFS Hidden Field Default Value

Viewing 6 reply threads
  • Author
    Posts
    • #22216
      CinderGirl
      Participant

      Can’t figure this one out…
      – So I have a field that is set to have a default value of Active within the list settings
      – This value isn’t being set so I’m assuming that using DFFS means that setting is ignored?
      – I have listed the field in the Tab
      – In my first rule, onLoad, I have set that field to be hidden

      I don’t want anyone to see this field. I just want the default value to auto update behind the scenes. Can I do this using the interface? Or do I have to set the value in custom JS?

      I believe if I do it in JS, I would use this the below? Just want to make sure I don’t always jump to using Custom JS if there’s a way to do it in the interface itself?

      setFieldValue(“Status”,”Active”);

      TIA!

    • #22220
      Keith Hudson
      Participant

      I have never had a problem getting a field that is not shown on my DFFS form to default to the value set on the SharePoint list settings for that field.

      You might try turning DFFS off on the new form temporarily, and see whether the field gets correctly set to the value you have specified as the default value in the list settings in the native SharePoint form when you create a new item. Perhaps there is something else preventing it.

    • #22222
      CinderGirl
      Participant

      Thanks for the reply Keith! So already tried testing that. If I turn DFFS off, the value is captured. Turned on, the value ends up blank :-/ And this happens on 2 fields. One is a drop down with 2 values, Active and Inactive. The other is today’s date. Both fill in fine without DFFS.

    • #22231
      Keith Hudson
      Participant

      Weird. Alex may have some troubleshooting ideas for you when he gets time to respond to this post, but here are a few ideas to explore:
      1. Is it possible that you have a rule on your DFFS form that runs when that is trying to set the value of those fields to a non-permitted value? Or a rule that changes the values for some reason?
      2. Turn on the developer tools in the browser (F12) before loading the DFFS form and choose the Console tab in the developer tools, then load the new form (or refresh the page if the new form is already open) and see if there is any error message in the console when the form loads. If so, post the error message here.
      3. Turn on debugging on all the rules on your new form and see if that gives you any clues as to what is happening. (I confess I haven’t used the rule-debug feature of DFFS much, so I’m not the best one to guide you in how to read the debug messages, but I have friends who make heavy use of it).

    • #22247
      Alexander Bautz
      Keymaster

      Hi,
      There is nothing preventing default values from being set in DFFS so I’m thinking the same as Keith here – maybe you have a rule that clears it?

      Alexander

    • #22267
      CinderGirl
      Participant

      Yep, that was it. I accidentally mentioned the fields in one of my clearing functions.

      Was so obvious after taking most of the weekend off. Guess I needed the break lol.

      Thanks again for all of the help!

    • #22277
      Alexander Bautz
      Keymaster

      I’m glad you figured it out.

      Alexander

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