I know this is quite an odd thing to ask, but I’m struggling with making your dropdown be a set of radio buttons…
the code currently says:
<div class="app_services_dropdown_select">
<select name="app_select_services" class="app_select_services">
<option value="1" selected="selected">Class IV MOT (Up to 3,000KG)</option>
<option value="2">Class VII MOT (3,000KG - 3,500KG)</option></select>
<input type="button" class="app_services_button" value="Show available times">
</div>
However I’m trying to get it to change to radio buttons
<div class="app_services_dropdown_select">
<input type="radio" name="app_select_services" class="app_select_services" value="1" />Class IV MOT (Up to 3,000KG)
<input type="radio" name="app_select_services" class="app_select_services" value="2" />Class VII MOT (3,000KG - 3,500KG)
<input type="button" class="app_services_button" value="Show available times">
</div>
I found class_app_shortcodes.php and I’ve changed the PHP to this:
$s .= '<div class="app_services_dropdown_select">';
//$s .= '<select name="app_select_services" class="app_select_services">';
if ( $services ) {
foreach ( $services as $service ) {
$service_description = '';
// Check if this is the first service, so it would be displayed by default
if ( $service->ID == $appointments->service ) {
$d = '';
$sel = ' checked="checked"';
}
else {
$d = ' style="display:none"';
$sel = '';
}
// Add options
//$s .= '<option value="'.$service->ID.'"'.$sel.'>'. stripslashes( $service->name ) . '</option>';
$s .= '<input type="radio" name="app_select_services" class="app_select_services" value="'.$service->ID.'"'.$sel.' />'. stripslashes( $service->name ).'<br />';
// Include excerpts
$e .= '<div '.$d.' class="app_service_excerpt" id="app_service_excerpt_'.$service->ID.'" >';
// Let addons modify service page
$page = apply_filters( 'app_service_page', $service->page, $service->ID );
switch ( $description ) {
case 'none' : break;
case 'excerpt' : $service_description .= $appointments->get_excerpt( $page, $thumb_size, $thumb_class, $service->ID ); break;
case 'content' : $service_description .= $appointments->get_content( $page, $thumb_size, $thumb_class, $service->ID ); break;
default : $service_description .= $appointments->get_excerpt( $page, $thumb_size, $thumb_class, $service->ID ); break;
}
$e .= apply_filters('app-services-service_description', $service_description, $service, $description) . '</div>';
}
}
//$s .= '</select>';
$s .= '<input type="button" class="app_services_button" value="'.$show.'">';
$s .= '</div>';
but when I select one of the radio buttons my url changes to ?app_service_id=undefined and it doesnt work, however if I manually change the url to ?app_service_id=1 or ?app_service_id=2 then it works.
Can you point me in the right direction please?