Skip Navigation

[Resolved] Save the default value of this field is not stored

This thread is resolved. Here is a description of the problem and solution.

Problem:

Setup default value of a custom field after user submit the Toolset post form.

Solution:

You can try with a hidden generic field, for example:

https://toolset.com/forums/topic/save-the-default-value-of-this-field-is-not-stored/#post-1605167

Relevant Documentation:

https://toolset.com/documentation/user-guides/front-end-forms/cred-shortcodes/#cred_generic_field

This support ticket is created 4 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 6 replies, has 2 voices.

Last updated by maioraL 4 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#1603827

Hi Luo, good morning.

As you can see on the new attacched screenshot i set a default value for my "Select" type field....
but is not saved when frontend form was submitted 🙁

Where is the mistake?

#1603835

Hello,

Thanks for the details, I have tried it in my localhost, it works fine, I can see the new post submitted by Toolset form can setup the default value of select field correctly.

So the problem you mentioned above is abnormal, please check these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/

2) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2020, and test again

3) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

4) If the problem still persists, please provide database dump file(ZIP file) of your website, also point out the problem page URL and form URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1603903

The DB dump file you provided is not valid:
https://toolset.com/forums/topic/save-the-default-value-of-this-field-is-not-stored/#post-1603865

You can put it in your own google drive disk, and share the link in below private message box, thanks

#1604561

Hi Luo, have some news?

Tnx a lot
Max

#1605057

I am downloading the files, will update here if there is any found.

#1605167

I can see the problem in my localhost, the problem is Toolset Forms does not submit the field value of "stato-pratica", so it stores an empty value in database, as a workaround, you can add a hidden field before the field "stato-pratica", for example, edit the post form "Modulo per Pratiche":
hidden link
in section "Form Editor", just before these line:

      <div class="form-group">
          <label>Stato Pratica</label>

Insert below hidden generic field:

[cred_generic_field type='hidden' field='wpcf-stato-pratica']
{
"default":"Nuova",
"persist": 1
}
[/cred_generic_field]

I have treid it with your duplicator package, it works fine.

More help:
https://toolset.com/documentation/user-guides/front-end-forms/cred-shortcodes/#cred_generic_field

#1605449

My issue is resolved, by a workaround for the moment but works fine 🙂 🙂