0

Hello I've been trying to get a dropdown on my channelform the only way it seems to work is if I do this.

{field:education_level}

this outputs fine like this

<select name="education_level">
<option value="0">- Please Select -</option>
<option value="10">No Formal Qualifications</option>
<option value="11">GCSE/GNVQ/O levels</option>
</select> 

But is there anyway to add either an id and class within the select for for my javascript and styling

2

A quick/easy solution would be to wrap the element with a div, and build your selector using that.

In jQuery, for example, you could use $('.select-wrapper select') to select this:

<div class="select-wrapper">{field:education_level}</div>

The CSS selector would be similar, of course:

.select-wrapper select{ border: 1px solid green; }

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.