Forums

Hiding Joomla site template and styling the form

taung 17 Feb, 2011
Hello,

I have a few forms that I want to show without the site's template.

Here is the form: http://dermbiz.dreamhosters.com/index.php?option=com_chronocontact&chronoformname=PatientReg_Attest_TEMPLATE

I can hide the site template by adding &tmpl=component to the end. http://dermbiz.dreamhosters.com/index.php?option=com_chronocontact&chronoformname=PatientReg_Attest_TEMPLATE&tmpl=component

But as soon as I hide the site template, I loose all the form styles.

How can I redo the form style? Do I have to make a custom style sheet for the form and load it up?

Any idea and help would be much appreciated.
GreyHead 17 Feb, 2011
Hi tuang,

You are using the template CSS to style the form so understandably you lose the formatting without the template.

You can load the required files from the Form HTML:
<?php
$doc =& JFactory::getDocument();
$doc->addStyleSheet(JURI::base().'/templates/yoo_enterprise/css/reset.css');
$doc->addStyleSheet(JURI::base().'/templates/yoo_enterprise/css/template.css');
. . .
?>

Bob
taung 26 Feb, 2011
Thanks it worked.

But to add more to it, this is what I did.

I wanted to hide all the Joomla header, logos, and footers.

So I made a copy of the template, take out all the header, menu and footers, and load the template in the form also.

So now I have a clean page which I can give users access.

But of course now I lost navigation feature. Short of making links in the after submission page user can click on, any idea on how I can provide navigation to other forms I have?
GreyHead 26 Feb, 2011
Hi tuang,

I guess that you can probably copy the menu code from a unedited version of the templae and add that to the Form HTML. I don't know if it will work or not though.

Bob
This topic is locked and no more replies can be posted.