Making WordPress.org

Changeset 8010


Ignore:
Timestamp:
12/21/2018 03:28:49 AM (6 years ago)
Author:
dd32
Message:

Showcase: Add HTML5 required attributes to the Site Submit form to get some basic client-side validation prior to submit.

This also marks the email and url fields as their HTML5 type to get the basic content validation too.

Fixes #4020.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-showcase/page-submit.php

    r8009 r8010  
    7878
    7979    <p><label for="submitname"><?php _e( 'Your Name', 'wporg-showcase' ); ?></label><br />
    80     <input type="text" name="submitname" id="submitname" class="text" value="<?php echo esc_attr( $submitname ); ?>" size="28" tabindex="2" /></p>
     80    <input type="text" name="submitname" id="submitname" class="text" value="<?php echo esc_attr( $submitname ); ?>" size="28" tabindex="2" required></p>
    8181
    8282    <p><label for="email"><?php _e( 'Your E-mail', 'wporg-showcase'); ?></label><br />
    83     <input type="text" name="email" id="email" value="<?php echo esc_attr( $email ); ?>" size="28" tabindex="3" class="text" /></p>
     83    <input type="email" name="email" id="email" value="<?php echo esc_attr( $email ); ?>" size="28" tabindex="3" class="text" required></p>
    8484
    8585    <p><label for="url"><?php _e( 'Site URL', 'wporg-showcase' ); ?></label><br />
    86     <input type="text" name="url" id="url" value="<?php echo esc_url( $url ); ?>" size="28" tabindex="4" class="text" /></p>
     86    <input type="url" name="url" id="url" value="<?php echo esc_url( $url ); ?>" size="28" tabindex="4" class="text" required></p>
    8787
    8888    <p><label for="owner"><?php _e( "Do you own this site? (It's okay if you don't - we just want to know for contact purposes.)", 'wporg-showcase' ); ?></label><br />
     
    9393
    9494    <p><label for="description"><?php _e( 'Please describe the site and, if applicable, the person or organization it represents.', 'wporg-showcase' ); ?></label><br />
    95     <textarea name="description" id="description" cols="60" rows="4" tabindex="6" class="text"><?php echo esc_textarea( $description ); ?></textarea></p>
     95    <textarea name="description" id="description" cols="60" rows="4" tabindex="6" class="text" required><?php echo esc_textarea( $description ); ?></textarea></p>
    9696
    9797    <p><label for="why"><?php _e( 'What justifies this site being added to the WordPress Showcase? What makes it unique or interesting?', 'wporg-showcase' ); ?></label><br />
    98     <textarea name="why" id="why" cols="60" rows="4" tabindex="7" class="text"><?php echo esc_textarea( $why ); ?></textarea></p>
     98    <textarea name="why" id="why" cols="60" rows="4" tabindex="7" class="text" required><?php echo esc_textarea( $why ); ?></textarea></p>
    9999
    100100    <p class="required"><?php _e( '* All fields are required.', 'wporg-showcase' ); ?></p>
Note: See TracChangeset for help on using the changeset viewer.