Skip Navigation

[Resolved] Form validation require currency symbol

This support ticket is created 2 years, 11 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
- 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 2 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#2254807

Hi

Is there a way to require a field when submitting to have a currency symbol (either £, $ or €).

I was thinking maybe this is possible with JS? Is there a hook to do this?

#2255137

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

There is no such feature available but you can use the Toolset Form's hook "cred_form_validate" to validate the field but again if you have added the currency field as numeric it will not allow you to add any other symbol, it will only allow you numeric values.

So, you should have to change the currency field type to "single field" and then you can validate the content using "cred_form_validate" hook:
=> https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate