How to add a custom style / form theme

anne1979 02 May, 2016
Hello Bob,

in the generated wizard code it says:
echo \GCore\Helpers\Html::formLine($field["name"], $field);

for the output of my dropdown. In the called function, several containers and classes are added to the html output.
I saw, that there are "themes" and I would like to add a theme to fit my needs.

How can I do that? I added my theme class to the helpers/themes folder, but it is not recognised...
Could you provide a short example?

Thank you for your help,
GreyHead 02 May, 2016
Hi Anne,

You can build entirely custom HTML for your form using the Code tab and setting the Form Type to Custom. I don't usually recommend this but it is entirely practical. As a half-way house you can add chunks of HTML - including inputs - in Custom Code elements in the Designer tab.

There is no direct support for Themes, but you could hack an existing theme to meet your needs (keep a backup as it may be over-written if you upgrade CF). Or you can load snippets or files from a Load CSS action in the form On Load event.

anne1979 02 May, 2016
Thanks for pointing out the possibilities. 🙂
This topic is locked and no more replies can be posted.