Custom CSS (form)

Status
Not open for further replies.

troester

Administrator
Staff member
Since ? the form gets an id #form_formid_rowid but custom_css.php is called with ?c=formid.

Is this intentionally?
In this case custom_css.php is wrong, you can't style with
#{$view}_$c .foobar {}
You must use
form[name={$view}_$c]
 
ah yes good spot, I've updated the form model to pass the row id to the custom_css script, and updated the custom_css_example.php file to this:

PHP:
header('Content-type: text/css');
$c = (int) $_REQUEST['c'];
$view = isset($_REQUEST['view']) ? $_REQUEST['view'] : 'form';
$rowid = isset($_REQUEST['rowid']) ? $_REQUEST['rowid'] : '';
$form = $view . '_' . $c;
if ($rowid !== '')
{
$form .= '_' . $rowid;
}
echo "
 
/* BEGIN - Your CSS styling starts here */
 
#$form .foobar {
display: none;
}
 
/* END - Your CSS styling ends here */
 
";
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top