Title: Required Custom Fields
Last modified: August 31, 2016

---

# Required Custom Fields

 *  Resolved [RobinKMullins](https://wordpress.org/support/users/robinkmullins/)
 * (@robinkmullins)
 * [10 years ago](https://wordpress.org/support/topic/required-custom-fields/)
 * I’ve 6 custom fields on the front end of a ticket submission form. I want them
   all to be required fields. I’ve followed the instructions for creating required
   custom fields but only some of them seem to pick up on the fact they are supposed
   to be required. One is a text field, one is a number (currency) field,and four
   are check boxes. Only the number field realizes it is supposed to be required.
   Any suggestions as to why the other 5 fields don’t pick up on the fact they are
   required.
 * [https://wordpress.org/plugins/awesome-support/](https://wordpress.org/plugins/awesome-support/)

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

 *  Thread Starter [RobinKMullins](https://wordpress.org/support/users/robinkmullins/)
 * (@robinkmullins)
 * [10 years ago](https://wordpress.org/support/topic/required-custom-fields/#post-7447646)
 * This is what I’ve got in the functions.php file.
    if ( function_exists( ‘wpas_add_custom_field’)){
   wpas_add_custom_field( ‘my_custom_field’, array( ‘title’ => __( ‘People in Household*’,‘
   awesome-support’ ) ) ); } if ( function_exists( ‘wpas_add_custom_field’ ) ) {
   wpas_add_custom_field( ‘my_field_with_options1’, array( ‘title’ => ”, ‘field_type’
   => ‘checkbox’, ‘options’ => array( ‘option’ => ‘I am at least 14 years old.*’),‘
   id’ => ‘check1’ ) ); } if ( function_exists( ‘wpas_add_custom_field’ ) ) {
 * wpas_add_custom_field( ‘my_field_with_options2’, array( ‘title’ => ”, ‘field_type’
   => ‘checkbox’, ‘options’ => array(‘option’ => ‘I live or have a legal issue in
   Whatcom County, WA.*’ ) ) );
 * wpas_add_custom_field( ‘my_field_with_options3’, array( ‘title’ => ”, ‘field_type’
   => ‘checkbox’, ‘options’ => array( ‘option’ => ‘My legal issue is not one for
   which I could go to jail.*’) ) );
 * wpas_add_custom_field( ‘my_field_with_options4’, array( ‘title’ => ”, ‘field_type’
   => ‘checkbox’, ‘options’ => array( ‘option’ => ‘I do not already have an attorney
   helping me with this issue.*’ ) ) );
 * }
    if ( function_exists( ‘wpas_add_custom_field’ ) ) { wpas_add_custom_field(‘
   my_custom_field1’, array( ‘title’ => __( ‘monthly income*’, ‘awesome-support’),‘
   field_type’ => ‘number’ , ‘required’ => true ) ); }
 *  Plugin Author [julien731](https://wordpress.org/support/users/julien731/)
 * (@julien731)
 * [10 years ago](https://wordpress.org/support/topic/required-custom-fields/#post-7447776)
 * In the code you shared, only the field “monthly income*” is set to be required.
 * If you need other fields to be mandatory, you must set the argument `required`
   to `true` just like for the monthly income field.

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

The topic ‘Required Custom Fields’ is closed to new replies.

 * ![](https://ps.w.org/awesome-support/assets/icon-256x256.png?rev=1849681)
 * [Awesome Support - WordPress HelpDesk & Support Plugin](https://wordpress.org/plugins/awesome-support/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/awesome-support/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/awesome-support/)
 * [Active Topics](https://wordpress.org/support/plugin/awesome-support/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/awesome-support/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/awesome-support/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [julien731](https://wordpress.org/support/users/julien731/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/required-custom-fields/#post-7447776)
 * Status: resolved