Search dropdowns instead of checkboxes

Permalink Browser Info Environment
Is there any way of displaying Employment Type and Locations as dropdowns rather than checkboxes.
Employment Category is already a dropdown and I cant find any options to display any differently.

Thanks.

Type: Discussion
Status: New
mediasplash
View Replies:
Tony replied on at Permalink Reply
Tony
by default it will just use whatever default concrete5 core form interface for whatever the given attribute type is. So to override this behavior you'd have to do a little customization, but it really shouldn't be hard to get this behavior if you know a little php. Take a look within the jobs search block view.php to see where that's being outputted, and try adding a conditional statement checking the handle of the attribute type. There may even already be an example there of doing something similar for some other attributes.
VPenkov replied on at Permalink Reply
VPenkov
I don't imagine that you still need this, but anyway.
In our view, under Tony's code at the beginning of the file, we added:
$category_attrKey = CollectionAttributeKey::getByHandle( 'employment_category' );
$category_opts = $category_attrKey->getController()->getOptions()->getOptions();


Later on, in the form, we display them like this:
<select name="akID[17][atSelectOptionID][]" data-dkid="dkid3" class="pretty dk" tabindex="2" style="display: none;">
                           <option selected="selected"><?php echo t('Employment Category'); ?></option>
                           <?php foreach ($category_opts as $opt): ?>
                              <option value="<?php echo $opt->getSelectAttributeOptionID(); ; ?>"><?php echo t($opt->value); ?></option>
                           <?php endforeach; ?>
                        </select>


PM me if you need anything else.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.