• Resolved vladost

    (@vladost)


    In WPUF I use Dropdown Custom Field in my Post Form. But in result HTML in browser I can not see ID this Select class. Present only
    <select class="wpuf_f_typepub_10" name="f_typepub" data-required="yes" data-type="select">
    Where to set the item ID? I need to refer to it further through the script on the page…

Viewing 3 replies - 1 through 3 (of 3 total)
  • Robin

    (@emazharulislam)

    Hello @vladost,

    WP User Frontend doesn’t save the dropdown’s value as an ID so it’s not possible to get the IDs.

    Thanks.

    Thread Starter vladost

    (@vladost)

    Sorry, but, for example, field as Text is generated the ID in HTML form, despite the fact that WPUF does not store it …
    <input class = "textfield wpuf_f_job_10" id = "f_job_10" type = "text" data-required = "no" data-type = "text" name = "f_job" placeholder = "" value = "" size = "40" >

    Thread Starter vladost

    (@vladost)

    By analogy with the Textfield field, I had modify line 1147 in the /class/render-form.php file (add id="<?php echo $attr['name'] .'_'. $form_id; ?>"). BUT VERY SORRY THAT IT WILL BE LOST IF PLUGIN UPDATED!
    Now line 1147 is:
    <select <?php echo $css; ?> class="<?php echo 'wpuf_'. $attr['name'] .'_'. $form_id; ?>" name="<?php echo $name; ?>"<?php echo $multi; ?> id="<?php echo $attr['name'] .'_'. $form_id; ?>" data-required="<?php echo $attr['required'] ?>" data-type="<?php echo $data_type; ?>"<?php $this->required_html5( $attr ); ?>>

    • This reply was modified 5 years, 7 months ago by vladost.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How I can set ID to select class?’ is closed to new replies.