WordPress.org

Ready to get started?Download WordPress

Forums

Mad Mimi for WordPress
Required field (2 posts)

  1. moisescalzo
    Member
    Posted 7 months ago #

    Hello,
    a question about the form fields, the only required field is the email, is it possible to set as required also others fields like phone?

    https://wordpress.org/plugins/mad-mimi/

  2. Worldscrown
    Member
    Posted 2 weeks ago #

    You will need to access the PHP files in the Mad-Mimi plugin

    add this to line 357 of the mad-mimi.php file:

    if(!isset($post['name']) || empty($post['name'])) {
                $errors['name'] = __('Please enter your Name.', 'mad-mimi');
            }
    		if(!isset($post['phone']) || empty($post['phone'])) {
                $errors['phone'] = __('Please enter your Phone Number.', 'mad-mimi');
            }
    		if(!isset($post['address']) || empty($post['address'])) {
                $errors['address'] = __('Please enter your Street Address.', 'mad-mimi');
            }
    		if(!isset($post['city']) || empty($post['city'])) {
                $errors['city'] = __('Please enter your City.', 'mad-mimi');
            }
    		if(!isset($post['state']) || empty($post['state'])) {
                $errors['state'] = __('Please enter your State.', 'mad-mimi');
            }
    		if(!isset($post['zip']) || empty($post['zip'])) {
                $errors['zip'] = __('Please enter your Zip Code.', 'mad-mimi');
            }

    Also the madmimi-widget.php file will need to be modified. Starting around line 115 is all the 'signup' code. compare them to the email signup code. you will need to add the
    <span class='required' title='This field is required'>*</span>
    to the other submit codes.

    hope this helps.

Reply

You must log in to post.

About this Plugin

About this Topic