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.

Our next available supporter will start replying to tickets in about 8.91 hours from now. Thank you for your understanding.

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 2 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

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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!

johnH-33 confirmed that the issue was resolved on 2024-02-02 15:43:08.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.