You are viewing limited content. For full access, please sign in.

Question

Question

Change 'Other' Field type for radio buttons/checkbox/etc.

asked on January 25, 2022

I am able to change the field type of the 'Other' box in a radio button field using

$('#Field6_other_value').prop('type', 'number');

This doesn't work using

$('#Field6_other_value').prop('type', 'currency');

I can even change it to a checkbox. When I try currency, it doesn't take any input at all though. 

0 0

Replies

replied on January 25, 2022

That won't work because "currency" is not a valid HTML input type. The currency fields in Forms are "text" inputs with specific attributes and event handlers providing all the functionality.

If you want a true currency input without having to recreate that functionality, then one option would be to use a separate field with field rules to show/hide based on whether or not "Other" is selected.

Personally, I usually avoid the built-in other fields when the input isn't simple text and instead use a separate field so I have more control over the input type, validation, etc.

HTML Input Types (w3schools.com)

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.