Title: alphanumeric value
Last modified: November 26, 2022

---

# alphanumeric value

 *  Resolved [futureyoon](https://wordpress.org/support/users/futureyoon/)
 * (@futureyoon)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/alphanumeric-value/)
 * Hi
 * In the simple text input field, is there a way to accept only alphanumeric value(
   english and number)?
    I don’t see any condition to fliter that.
 * Or can I use ‘custom html’ to build something like that? if so, any sample?
 * Please kindly advise me on that.
 * Thank you
    -  This topic was modified 3 years, 5 months ago by [futureyoon](https://wordpress.org/support/users/futureyoon/).
    -  This topic was modified 3 years, 5 months ago by [futureyoon](https://wordpress.org/support/users/futureyoon/).
    -  This topic was modified 3 years, 5 months ago by [futureyoon](https://wordpress.org/support/users/futureyoon/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Tahmid ul Karim](https://wordpress.org/support/users/tahmidulkarim/)
 * (@tahmidulkarim)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/alphanumeric-value/#post-16242952)
 * Hi [@futureyoon](https://wordpress.org/support/users/futureyoon/),
 * There isn’t any direct option to set the simple text field to only accept alphanumeric
   values. You would have to use custom JS codes for that.
 * With JS codes, you can use this regex code to check for alphanumeric values –
 * `/^[a-z0-9]+$/i`
 * Thank you.
 *  Thread Starter [futureyoon](https://wordpress.org/support/users/futureyoon/)
 * (@futureyoon)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/alphanumeric-value/#post-16254077)
 * Hi Karim,
 * Thank you for the update.
    Just curious if you have sample JS codes doing such
   thing? I am sorry I am not so techy writing such code myself.
 * Thank you
 *  [Tahmid ul Karim](https://wordpress.org/support/users/tahmidulkarim/)
 * (@tahmidulkarim)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/alphanumeric-value/#post-16263661)
 * Hi [@futureyoon](https://wordpress.org/support/users/futureyoon/),
 * Here is example JS code snippet –
 *     ```
       let text_field = document.querySelector("#ff_34_input_text");
   
       text_field.addEventListener('input', function(e) {
           e.target.value = e.target.value.replace(/[^a-zA-Z0-9]/g, '')
       });
       ```
   
 * Please note that adding the code directly to your form won’t work. You have to
   change the selected field inside the querySelector and add your specific field
   ID.
 * Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘alphanumeric value’ is closed to new replies.

 * ![](https://ps.w.org/fluentform/assets/icon-256x256.png?rev=3354580)
 * [Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder](https://wordpress.org/plugins/fluentform/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/fluentform/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/fluentform/)
 * [Active Topics](https://wordpress.org/support/plugin/fluentform/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fluentform/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fluentform/reviews/)

## Tags

 * [alphanumeric](https://wordpress.org/support/topic-tag/alphanumeric/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tahmid ul Karim](https://wordpress.org/support/users/tahmidulkarim/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/alphanumeric-value/#post-16263661)
 * Status: resolved