# set eForm CSS file $eFormCSS = isset($eFormCSS)?$eFormCSS:''; if($eFormCSS != '') { $eFormCSS = $modx->config['base_url'] . $eFormCSS; $modx->regClientCSS($eFormCSS); }
&eFormCSS=`assets/snippets/eform/contact.css`
// eForm Params eFormCSS => $eFormCSS, vericode => isset($vericode)? $vericode:"", formid => isset($formid)? $formid:"",
I think that all the forms on a site must be styled in a consistent way, why do you want different styles for them?
I got tired of cluttering up my main CSS file with styling for all the different forms a site might have.
I know, technically speaking you are quite correct, but personally I’m not too bothered about it in this case. Separation of presentation and data is in the case of a form not really an issue (in my opinion). Form elements may carry data from one place to another but form elements in my interpretation are themselves presentation. Having a style block inside the body of a form doesn’t do an injustice to the thought behind standards as far as I’m concerned.
Inline style blocks are technically not valid...
I’m on the fence about whether or not you should bundle in the ability to bundle in the style registration (and leaning towards doing so). Requiring an additional TV + a Snippet isn’t exactly easy for setting up. A small purpose-built plain old addCSS widget would make sense much like UltimateParent ... basically a config-free utility snippet.
Ditto and Wayfinder handle their CSS needs internally and I think I lean towards making this an optional/default parameter for eForm, too.
{{ContactCss}}
[[eForm?...]]