Skip Navigation

[Resolved] Converting CRED form input data to Proper Case

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 1 year, 5 months ago.

Assisted by: Minesh.

Author
Posts
#2626317

Tell us what you are trying to do? Convert entered data to proper case for CRED form. In other words, regardless of whether user uses all small, all caps or something in between, the values should always be stored as "This Is The Data".

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

#2626607

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

You can sue Toolset Form API hook:
- "cred_before_save_data":
=> https://toolset.com/documentation/programmer-reference/cred-api/#cred_before_save_data
OR
- "cred_save_data":
=> https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

And use the PHP function ucwords() to convert all first character of all words to uppercase.
=> hidden link

#2627585

Thank you!