Home Forums Front-end Issues Output Multiple Select Fields


Output Multiple Select Fields

  • Hi,

    I have created a few custom fields in a custom post for a membership site
    One of the fields that I created was “Select” field type with multiple values enabled.

    However, I am having difficulty for the values to be updated.
    Anyone have any idea what I do wrong??
    here is my code:
    $tutor_qualifications = get_field(‘tutor_qualifications’,$candidate_id);

    <label><?php esc_html_e(‘Qualifications’, ‘wp-jobsearch’) ?></label>
    <div class=”jobsearch-profile-select”>
    <label for=”QualificationsSelect” >
    <select name=”tutor_qualifications” id=”QualificationsSelect” class=”selectize-select” placeholder=”<?php esc_html_e(‘Pls select your qualifications (you may select more than one)’, ‘wp-jobsearch’) ?>” multiple=”true” >

    <option <?php echo ($tutor_qualifications == ‘GCE_NLEVEL’ ? ‘selected=”selected”‘ : ”) ?> value=”GCE_NLEVEL”><?php esc_html_e(‘GCE N-LEVEL’, ‘wp-jobsearch’) ?></option>

    <option <?php echo ($tutor_qualifications == ‘GCE_OLEVEL’ ? ‘selected=”selected”‘ : ”) ?> value=”GCE_OLEVEL”><?php esc_html_e(‘GCE O-LEVEL’, ‘wp-jobsearch’) ?></option>

    <option <?php echo ($tutor_qualifications == ‘GCE_ALEVEL’ ? ‘selected=”selected”‘ : ”) ?> value=”GCE_ALEVEL”><?php esc_html_e(‘GCE A-LEVEL’, ‘wp-jobsearch’) ?></option>

    <option <?php echo ($tutor_qualifications == ‘IP_IB’ ? ‘selected=”selected”‘ : ”) ?> value=”IP_IB”><?php esc_html_e(‘IP/IB’, ‘wp-jobsearch’) ?></option>

    <option <?php echo ($tutor_qualifications == ‘NITEC’ ? ‘selected=”selected”‘ : ”) ?> value=”NITEC”><?php esc_html_e(‘NITEC’, ‘wp-jobsearch’) ?></option>

    <option <?php echo ($tutor_qualifications == ‘Higher_NITEC’ ? ‘selected=”selected”‘ : ”) ?> value=”Higher_NITEC”><?php esc_html_e(‘Higher NITEC’, ‘wp-jobsearch’) ?></option>

    <option <?php echo ($tutor_qualifications == ‘Diploma’ ? ‘selected=”selected”‘ : ”) ?> value=”Diploma”><?php esc_html_e(‘Diploma’, ‘wp-jobsearch’) ?></option>

    <option <?php echo ($tutor_qualifications == ‘Advanced_Diploma’ ? ‘selected=”selected”‘ : ”) ?> value=”Advanced_Diploma”><?php esc_html_e(‘Advanced Diploma’, ‘wp-jobsearch’) ?></option>

    <option <?php echo ($tutor_qualifications == ‘Bachelors_Degree’ ? ‘selected=”selected”‘ : ”) ?> value=”Bachelors_Degree”><?php esc_html_e(‘Bachelor Degree’, ‘wp-jobsearch’) ?></option>

    <option <?php echo ($tutor_qualifications == ‘PGDE’ ? ‘selected=”selected”‘ : ”) ?> value=”PGDE”><?php esc_html_e(‘PGDE’, ‘wp-jobsearch’) ?></option>

    <option <?php echo ($tutor_qualifications == ‘Masters’ ? ‘selected=”selected”‘ : ”) ?> value=”Masters”><?php esc_html_e(‘Masters’, ‘wp-jobsearch’) ?></option>

    <option <?php echo ($tutor_qualifications == ‘PHD’ ? ‘selected=”selected”‘ : ”) ?> value=”PHD”><?php esc_html_e(‘PHD’, ‘wp-jobsearch’) ?></option>

    <option <?php echo ($tutor_qualifications == ‘Others’ ? ‘selected=”selected”‘ : ”) ?> value=”Others”><?php esc_html_e(‘Others’, ‘wp-jobsearch’) ?></option>


    —- Versions —-
    ACF v5.8.3
    WP v5.2.2

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.