Skip Navigation

[Resolved] Make generic field as readonly

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 1 reply, has 2 voices.

Last updated by Luo Yang 1 year, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#2594975

Dear Sir/Madam,

I want to make the generic field as readonly but not work, below is my code in POST FORM

[cred_generic_field type='textfield' field='gf-member-expiry-date' class='form-control' readonly='true']
{
"required":0,
"default":"",
"persist":1,
"readonly":1
}
[/cred_generic_field]

No matter the attribute readonly='true' or "readonly":1 doesn't work.

#2595951

Hello,

There isn't such kind of built-in feature within Toolset Forms plugin, see our document:
https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_generic_field
There isn't readonly attribute, so your shortcode won't work.

If you just want to display some value as a input field, you can try to setup it with HTML codes, for example:

<input type="text" name="gf-member-expiry-date" value="" class=" wpt-form-textfield form-textfield textfield" readonly="readonly">