Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Reply To: [Waiting for user confirmation] CRED – How to make fields required?

$
0
0

Okay, but in the meanwhile, I need to create the workarounds.

It is not good to have the form and the user can submit it with nothing but a title. For example, I need the form to force the user to select appropriate taxonomy as well. You helped me with this script to make sure only one was selected, but I need to also make sure at least one is selected. Can you help?

jQuery(function( $ ) {
 
  // Regions
  $( "input[name='region[]']" ).click( function() {
    $( "input[name='region[]']" ).not(this).removeAttr('checked');
    return true;
  } );
  
    // Categories
  $( "input[name='category[]']" ).click( function() {
    $( "input[name='category[]']" ).not(this).removeAttr('checked');
    return true;
  } );
 
  // Genres
  $( "input[name='genre[]']" ).click( function() {
    $( "input[name='genre[]']" ).not(this).removeAttr('checked');
    return true;
  } );
 
} );

Viewing all articles
Browse latest Browse all 20145

Trending Articles