• Resolved zeevee1

    (@zeevee1)


    Awesome plugin, highly recommended!!!

    Question:
    How can I define a place holder for dropdown calendar so the default values are “Month”, “Date” and “Year” not January, 01 and current year? I guess we have to put Month, Date and Year and the list value and selected but I am not sure how?

    http://wordpress.org/plugins/age-verify/

Viewing 1 replies (of 1 total)
  • Thread Starter zeevee1

    (@zeevee1)

    Well I think the support is dead for this plugin, but I have an answer if somebody else is trying to implement this:

    functions.php, Line 325

    case ‘dropdowns’ :
    $form.='<p><select name=”av_verify_m” id=”av_verify_m”>’;
    $form.='<option value=”” disabled selected>Month</option>’;
    foreach ( range( 1, 12 ) as $month ) :
    $month_name = date( ‘F’, mktime( 0, 0, 0, $month, 1 ) );
    $form .= ‘<option value=”‘ . $month . ‘”>’ . $month_name . ‘</option>’;

    endforeach;

    $form .= ‘</select> – <select name=”av_verify_d” id=”av_verify_d”>’;
    $form.='<option value=”” disabled selected>Date</option>’;
    foreach ( range( 1, 31 ) as $day ) :
    $form .= ‘<option value=”‘ . $day . ‘”>’ . esc_html( zeroise( $day, 2 ) ) . ‘</option>’;

    endforeach;

    $form .= ‘</select> – <select name=”av_verify_y” id=”av_verify_y”>’;
    $form.='<option value=”” disabled selected>Year</option>’;
    foreach ( range( 1910, date( ‘Y’ ) ) as $year ) :
    $selected = ( $year == date( ‘Y’ ) ) ? ‘selected=”selected”‘ : ”;
    $form .= ‘<option value=”‘ . $year . ‘”>’ . $year . ‘</option>’;

    endforeach;

    $form .= ‘</select></p>’;

    break;

Viewing 1 replies (of 1 total)
  • The topic ‘Placeholder for Dropdown’ is closed to new replies.