Home › Forums › Classic DFFS › Hidden Field Default Value
Tagged: default, default value, DFFS, hidden, hidden field
- This topic has 6 replies, 3 voices, and was last updated 6 years, 2 months ago by Alexander Bautz.
-
AuthorPosts
-
-
September 28, 2018 at 03:55 #22216
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 hiddenI 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!
-
September 28, 2018 at 05:07 #22220
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.
-
September 28, 2018 at 16:19 #22222
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.
-
September 29, 2018 at 19:15 #22231
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). -
September 30, 2018 at 14:01 #22247
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
-
October 1, 2018 at 18:53 #22267
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!
-
October 1, 2018 at 19:48 #22277
I’m glad you figured it out.
Alexander
-
-
AuthorPosts
- You must be logged in to reply to this topic.