Forums

Adding a Theme to style Forms in Modules

kj100 20 Oct, 2009
From searching the forum I get the impression that it is possible to add additional themes by copying the existing default theme folder. I would like to do this as I have an installation that requires several forms loaded in modules which require significantly different styling.

I've copied and re-named the default theme folder and I'm assuming that I now need to use "Transform Form" to use this new theme but it does not appear in the Transform Form dialogue. Am I missing something here?

Thanks

Kevin
GreyHead 20 Oct, 2009
Hi Kevin,

I've not played with this much but it seems to work for me. I just the copied 'theme1' folder, renamed the copy to 'theme2' and that shows up in the Transform Form 'Select' window.

Bob
kj100 20 Oct, 2009
Bob
Thanks for quick reply.
I've just tried again copying both the default and theme1 folders but neither show up in the Transform Form dialogue.

Kevin
GreyHead 20 Oct, 2009
Hi Kevin,

:-( I don't have anything else to suggest - I checked the code but all it does is read the contents of the themes folder; if there are more folders there it should find them OK.

You might check the permissions of the new copy and make sure that it is readable to the Joomla user.

Bob
kj100 20 Oct, 2009
Thanks for the suggestion but permissions are identical.

Is it theme directory name that the code picks up for the theme name? I've tried changing the name of the theme1 directory and that did not change anything.
GreyHead 21 Oct, 2009
Hi Kevin,

I may have found the problem - there are two copies of the themes. One in the administrator and one in the front-end. I've been working with the version in administrator/components/com_chronocontact/themes

It looks as though the Transform Wizard uses that folder. But the front-end form display uses the other folder components/com_chronocontact/themes

Seems a bit odd to me but should work OK if you make sure that the folders are in sync.

Bob
kj100 21 Oct, 2009
Bob

Thanks for your perseverance.

So to make sure I have this right and record it for anyone else who might need it:

• When a form is transformed to use a different theme it uses the theme folder located the administrator directory of Joomla administrator/components/com_chronocontact/themes

• Once the form has been transformed it will use the theme files located in components/com_chronocontact/themes when it is displayed.

• If I wish to make further styling changes through editing the theme I need to edit the front end version at components/com_chronocontact/themes AND copy these edits into the administrator area theme files so that any future form transformations pick them up.

My own experiments would seem to show that this is the case. It also might explain a couple of other threads I spotted along the way where theme edits were not getting displayed!

It now gives me a way to let users apply styling to a form that will work well in a module position.

Thanks again for your help
Kevin
This topic is locked and no more replies can be posted.