Title: Required text inputs
Last modified: August 24, 2023

---

# Required text inputs

 *  Resolved [minichiello](https://wordpress.org/support/users/minichiello/)
 * (@minichiello)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/required-text-inputs/)
 * Hello,
 * I am currently using a multi-step form, and on a page there is a checkbox that
   if selected some input fields become required, but if I leave these required 
   fields in the default form in the field and these are not filled in, the submission
   will not proceed.
 * My question is whether there is an option to use the $form object in JavaScript,
   to enable this field to be required by default using JavaScript in the moment
   the checkbox field is selected, I am currently using JavaScript to make these
   input fields required in the HTML, but this is not an elegant way.
 * Thank you.

Viewing 1 replies (of 1 total)

 *  [Tahmid ul Karim](https://wordpress.org/support/users/tahmidulkarim/)
 * (@tahmidulkarim)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/required-text-inputs/#post-17000246)
 * Hi [@minichiello](https://wordpress.org/support/users/minichiello/), 
   You can
   make a field required using JavaScript. You can find the field settings in the
   fluent_form_ff_form_instance_128_1 object. Here 128 is the ID of the form. So,
   replace 128 with your form ID to which you want to apply the code. For example,
   if you want to make an email field required, then the code will be –
 *     ```wp-block-code
       fluent_form_ff_form_instance_128_1.rules.email.required.value = true;
       ```
   
 * Let me know if this works.
 * Thank you!

Viewing 1 replies (of 1 total)

The topic ‘Required text inputs’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [Tahmid ul Karim](https://wordpress.org/support/users/tahmidulkarim/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/required-text-inputs/#post-17000246)
 * Status: resolved