WordPress.org

Ready to get started?Download WordPress

Forums

WP Stripe
[resolved] How to make Another field 'Required' (2 posts)

  1. Alex Vasquez
    Member
    Posted 2 years ago #

    Hey THere,
    There's a field on the form labeled 'comments.' I want to change that to 'Company Name.' I already know how to do that in stripe-display.php. What I'd like to be able to do is make that field 'required.'

    How can I do that?

    Thanks.

    http://wordpress.org/extend/plugins/wp-stripe/

  2. hmoore71@cox.net
    Member
    Posted 2 years ago #

    in stripe-display this is how I made the name required;

    `jQuery(document).ready(function() {
    jQuery("#ccg-stripe-payment-form").submit(function(event) {

    jQuery(".payment-errors").hide();

    if(jQuery('#ccg-name').val()==""){ //added to require name
    alert("Please enter your name");
    return false;
    }
    `
    note I added the id='ccg-name' to the name input html.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags