Skip to content

Commit

Permalink
Merge pull request #2511 from kimcoleman/require-checkout-fields-html5
Browse files Browse the repository at this point in the history
Add html5 required attribute to field to checkout fields
  • Loading branch information
ideadude authored Jun 13, 2023
2 parents b844ff1 + 4d7fdf5 commit 8cee427
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js/pmpro-checkout.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ jQuery(document).ready(function(){
//add required to required fields
if ( ! jQuery( '.pmpro_required' ).next().hasClass( "pmpro_asterisk" ) ) {
jQuery( '.pmpro_required' ).closest( '.pmpro_checkout-field' ).append( '<span class="pmpro_asterisk"> <abbr title="Required Field">*</abbr></span>' );
jQuery( '.pmpro_required' ).attr( 'required', 'required' );
}

//Loop through all radio type fields and move the asterisk.
Expand Down

0 comments on commit 8cee427

Please sign in to comment.