redirecting with different templates

Post any questions you may have here

redirecting with different templates

Postby kai920 on Sat Mar 22, 2008 4:05 pm

I have 6 templates on my site... one "index template" (like a splash page), and 5 site templates.

I am trying to send a simple acknowledgment message after the user submits the form, without using 5 different forms. (each form has 1 redirect URL field... thus 5 different URLs I can redirect to)

Even if I redirect to the original form URL, I will still need 5 forms.

Is there a way to avoid this?
kai920
Senior Boarder
 
Posts: 46
Joined: Thu Mar 20, 2008 4:00 pm

Re:redirecting with different templates

Postby GreyHead on Sat Mar 22, 2008 5:22 pm

Hi kai920,

I'm not understanding correctly. ChronoForms doesn't do any styling so should pick up the template code in use??

What happens if you just add some simple html in the OnSubmit after email box? That should show up as a a Thank You page. If the css in it matches the template css it should be styled too??

Bob
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3253
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re:redirecting with different templates

Postby kai920 on Sat Mar 22, 2008 11:19 pm

Hello Bob,

Here's the thing, in the admin backend Chronoforms auto-generates the link URL (for example: index.php?option=com_chronocontact&chronoformname=toolkit) but this link actually uses the DEFAULT template (my "splash page" template) -- which is not what I want.

I found that I need to create a link URL with a unique ItemID to be able to assign the template I need. I have tried adding some simple html thank you page ( see here) but on redirect this uses the index template because it redirects to index.php?option=com_chronocontact&task=send&chronoformname=toolkit.

The redirect method that works is to use the mambot and use the {chronocontact} call to bring up the form, then redirect to a specific content item that has a short thank you message. But this method requires 5 different {chronocontact} calls (5 content items) + 5 different "form acknowledgment" content items.

I hope my explanation makes sense!<br><br>Post edited by: GreyHead, at: 2008/03/23 00:42
kai920
Senior Boarder
 
Posts: 46
Joined: Thu Mar 20, 2008 4:00 pm

Re:redirecting with different templates

Postby GreyHead on Sun Mar 23, 2008 4:41 am

Hi Kai,

If you collect the ItemID from the page somehow you could change the redirect in the 'OnSubmit after email' box. I think that would do what you want.

Bob
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3253
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re:redirecting with different templates

Postby admin on Wed Mar 26, 2008 12:41 am

Hi Kai,

Try to make the Chronoform menu item of type "Component", once you make the menu item and click APPLY you will see the formname field on the right hand side and then you can add the form name, this way the menu item will have a unique ItemId!

Cheers

Max
ChronoForms/ChronoConnectivity/ChronoComments Developer Thanks for using our components!
If you have any problems with any extension please tell us.
If you like any of our extensions please post a review at Joomla.org
Want users to submit their content to your website ? try Submit Story
Want to list/edit/delete your data ? try ChronoConnectivity
Want to have stylish AJAX comments ? try ChronoComments
User avatar
admin
Platinum Boarder
 
Posts: 2355
Joined: Mon Aug 14, 2006 5:29 am

Re:redirecting with different templates

Postby kai920 on Wed Mar 26, 2008 4:36 pm

Hi Max & Bob,

Thank you both - good suggestions. I had not noticed the form name parameter at the right of the component link before. Not sure how it will help but will play around with it.

Also like Bob's ItemID idea... I will try something with _GET itemid and see if that can redirect me to different URLs.
kai920
Senior Boarder
 
Posts: 46
Joined: Thu Mar 20, 2008 4:00 pm

Re:redirecting with different templates

Postby kai920 on Wed Mar 26, 2008 8:55 pm

GreyHead wrote:Hi Kai,

If you collect the ItemID from the page somehow you could change the redirect in the 'OnSubmit after email' box. I think that would do what you want.

Bob


I tried forwarding with this code

<meta http-equiv="refresh" content="5; url=original link" >

but it still goes to my index splash template, waiting 5 seconds before going to the original link. Is there a way to skip straight to the link I want to redirect to?

I also did Max's suggestion and entered "toolkit", my form name, into the URL parameter. The itemid is 157, but I am not sure how this helps. :unsure:
kai920
Senior Boarder
 
Posts: 46
Joined: Thu Mar 20, 2008 4:00 pm

Re:redirecting with different templates

Postby admin on Thu Mar 27, 2008 6:00 am

Hi Kai,

You got a unique itemiid then you can use the template manager to assign your template to it, no ?
ChronoForms/ChronoConnectivity/ChronoComments Developer Thanks for using our components!
If you have any problems with any extension please tell us.
If you like any of our extensions please post a review at Joomla.org
Want users to submit their content to your website ? try Submit Story
Want to list/edit/delete your data ? try ChronoConnectivity
Want to have stylish AJAX comments ? try ChronoComments
User avatar
admin
Platinum Boarder
 
Posts: 2355
Joined: Mon Aug 14, 2006 5:29 am

Re:redirecting with different templates

Postby kai920 on Thu Mar 27, 2008 8:52 am

Hello,

I did assign a template to that menu item, but when I click on it in chronoforms backend ( index.php?option=com_chronocontact&chronoformname=toolkit) it still uses the splash template and not the one I assigned it.
kai920
Senior Boarder
 
Posts: 46
Joined: Thu Mar 20, 2008 4:00 pm

Re:redirecting with different templates

Postby admin on Fri Mar 28, 2008 3:02 am

Sure, because this link won't have the itemId, no way to change this, you will always need to view the form through that menu item if you wanna see it under this template!

Cheers

Max<br><br>Post edited by: admin, at: 2008/03/27 23:02
ChronoForms/ChronoConnectivity/ChronoComments Developer Thanks for using our components!
If you have any problems with any extension please tell us.
If you like any of our extensions please post a review at Joomla.org
Want users to submit their content to your website ? try Submit Story
Want to list/edit/delete your data ? try ChronoConnectivity
Want to have stylish AJAX comments ? try ChronoComments
User avatar
admin
Platinum Boarder
 
Posts: 2355
Joined: Mon Aug 14, 2006 5:29 am

Re:redirecting with different templates

Postby kai920 on Sat Mar 29, 2008 12:19 pm

So is there no way to get around having 5 different forms?
kai920
Senior Boarder
 
Posts: 46
Joined: Thu Mar 20, 2008 4:00 pm

Re:redirecting with different templates

Postby admin on Tue Apr 01, 2008 12:47 am

You can have any number of forms you need, but to see them inlcuded in the template you need then you must view the page with the correct itemid!

Cheers

Max
ChronoForms/ChronoConnectivity/ChronoComments Developer Thanks for using our components!
If you have any problems with any extension please tell us.
If you like any of our extensions please post a review at Joomla.org
Want users to submit their content to your website ? try Submit Story
Want to list/edit/delete your data ? try ChronoConnectivity
Want to have stylish AJAX comments ? try ChronoComments
User avatar
admin
Platinum Boarder
 
Posts: 2355
Joined: Mon Aug 14, 2006 5:29 am

Re:redirecting with different templates

Postby kai920 on Tue Apr 01, 2008 9:41 am

Hi Max,

That is actually the thing I am trying to avoid. I want to have ONE form that collects the same information for the 5 templates. I do not want to have 5 tables of data to go through in the admin backend.

I have 5 content items currently with calls to load the SAME form through the chronocontact mambot. But I can't get the redirect to work correctly after submission.

Sorry if I am misunderstanding what you are saying, but I don't see how the itemid helps in my case?


Cheers,
Kai
kai920
Senior Boarder
 
Posts: 46
Joined: Thu Mar 20, 2008 4:00 pm

Re:redirecting with different templates

Postby kai920 on Tue Apr 01, 2008 4:23 pm

hi Max, further to my previous email: this is what I am doing now... maybe you can give me some suggestions on how to improve this:

template 1:
content item 1 -> {chronocontact}form{/chronocontact} -> redirect to acknowledgment 1

template 2:
content item 2 -> {chronocontact}form{/chronocontact} -> redirect to acknowledgment 2

template 3:
content item 3 -> {chronocontact}form{/chronocontact} -> redirect to acknowledgment 3

template 4:
content item 4 -> {chronocontact}form{/chronocontact} -> redirect to acknowledgment 4

template 5:
content item 5 -> {chronocontact}form{/chronocontact} -> redirect to acknowledgment 5
kai920
Senior Boarder
 
Posts: 46
Joined: Thu Mar 20, 2008 4:00 pm


Return to ChronoForms Questions & Answers

Who is online

Users browsing this forum: mcometa, MSN [Bot], Yahoo [Bot] and 5 guests