Reply To: easy_form parameter resource in shortcode

Hello,

I have to change it in each form to select the correspondant resource.
If i change it in the general form the selection will be applicated to all of my forms.

In the shortcode generator we can select a resource just for the shortcode we editing.
Previously it worked but not from the last update.

I think you’ve got a problem with a local variable that take the value of another.
I think the problem is in this function (/lib/function /both.php) :
function easyreservations_resource_options($selected=”, $check=0, $exclude= ”){
$rooms = easyreservations_get_rooms(0, $check);
$rooms_options=”;
foreach( $rooms as $room ){
if(empty($exclude) || !in_array($room->ID, $exclude)){
if(!empty($selected) && $selected == $room->ID) $select = ‘ selected=”selected”‘; else $select = “”;
$rooms_options .= ‘ID.'”‘.$select.’>’.__($room->post_title).”;
}
}
return $rooms_options;
}

More precisely here :
if(!empty($selected) && $selected == $room->ID) $select = ‘ selected=”selected”‘; else $select = “”;

Best regards,

Fred