Skip Navigation

[Resolved] Hidden fields

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/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by Waqar 9 months, 3 weeks ago.

Assisted by: Waqar.

Author
Posts
#2680862

How should I hide a field in a form? I also need to set a static value.

#2680863
hidden.png

Okay I found hidden fields, but I guess the field can't be created in the Custom Fields tab. It has to be created in the form editor. Is that correct?

#2680932

Hi,

From your message, I understand that you have a custom field added through the Toolset custom fields tab and you'd like to set a hidden fixed value for it in a form.

If that is correct, you can switch to 'Expert mode' and include a generic field's shortcode like this:
( ref: https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_generic_field )


[cred_generic_field type='hidden' field='wpcf-field-slug']
{
"default":"some static value",
"persist":1
}
[/cred_generic_field]

Please replace 'field-slug' with your custom field's slug and 'some static value' with the fixed value that you'd like to save.

regards,
Waqar

#2681438

Thank you!