} // Everything else if ($service_id) { $cols = array('id AS service_id', 'title', 'user_info', 'info_title', 'description'); $result = $db->where('id', $service_id)->get('third_service', null, $cols); } // Build form if ($db->count > 0) { foreach ($result as $item) { $modal->instructions($item['description']); $modal->input_text("edit[{$item['service_id']}]"); $modal->label("Enter your {$item['info_title']}"); $modal->autofocus(true); $modal->required(true); $modal->value($item['user_info']); $modal->maxlength(32); $modal_output .= $modal->paint(); if ($widget_id) { $modal->input_text('widget_value'); $modal->label("Enter your {$item['widget_info']}"); $modal->required(true); $modal->value($item['widget_value']); $modal->maxlength(32); $modal_output .= $modal->paint(); $modal->headline('Enter your details <span>' . $item['title'] . ' ' . lcfirst($item['widget']) . '</span>'); } else { $modal->headline("Enter your details <span>{$item['title']}</span>"); } } if ($match_id) { $modal->input_hidden('match_id');