Lightbox without site template J1.6+

andypooz 18 Mar, 2012
I've been using Greyhead's tutorial at http://greyhead.net/chronoforms/show-a-form-in-a-light-box to view a form in a lightbox, but I can't seem to strip out the template. I'm using J2.5

I believe this is an issue with Joomla 1.6+ (Not sure if Bob's tutorial is from before 1.6). Is there any way to view the form in a lightbox without the template now?
&template=component doesn't seem to do the job any more

See my attempt at: http://getlockr.com/dev/athlete and try to 'Add an athlete'

Thanks
Andy
GreyHead 18 Mar, 2012
Hi Andy,

It should be &tmpl=component or &tmpl=component depending on where you are using it (still as it is in the article).

Bob
andypooz 19 Mar, 2012
Cheers Bob,

I had entered 'tmpl' not 'template' after all, so that wasn't the issue. The issue came out of my ignorance of what 'tmpl=component' does. I assumed it was some fancy Joomla function that strips away all of the non-component code when in fact it just looks for the 'component.php' file in your template folder and bases the output off that.

When I look at my component.php file it was just including index.php, so no wonder it wasn't working. Been working in Joomla for years and still making daft assumptions that spend ages to resolve.

The template is one I created from a 'blank' joomla template- never looked in component.php.

You never know, it might help others.

Andy
GreyHead 19 Mar, 2012
Hi Andy,

Well that makes two of us - I didn't know that was how it works either. Thanks.

Bob
andypooz 26 Mar, 2012
Bob (or anyone else with some ideas),

I was hoping to pick your brains with something related to this modal issue.

I'm creating a form where someone can enter in an sporting play/move. Each play must belong to a category, and they will select the appropriate category from a drop down list which pulls its values from a database table.

The thing is that if they can't find a category that applies to what they are doing, I want to give users the option to add their own category. I'll place a button/link on the main form which will open up a separate form in a modal and they can add in the name of their new category and click save

Anyway, 2 questions:
-How can I close the modal after I have saved the category to the database. I'd rather not give them a success message and make them manually close it.
-Related to above, how can I make the new option visible (and 'selected') in the drop down list on the main form? I take I'll have to refresh the form? How do I do this automatically when the modal on top closes, and what effect will it have on the previously entered form data
?

If I'm approaching this in the wrong way, please suggest a better approach.

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