How - After Submission - no more Form pls

lab5 23 Jan, 2010

I have the problem that, after successfully sending the eMail with the forms' data,
I still see the form - even nonblank ( that is inclusive all the old data )
and the "After Submission Text" ( aka "TY-Message" ) only below the form.

Shouldn't after succesfull submission actually ONLY be the TY-Message and NO more form ??
If yes - what i'd expect / is usual with forms ) : how do i get rid of the form been still shown after submission ? What is wrong ? I ONLY and EXCLUSIVELY want the Post-Submission-Text be visible, without having to greate en extra article and link on that via Post-Submission-URL.

?? Pls help, need to get that form ready this Monday. I feel the answer must be easy but maybe not so obvious. Tried 4 hours now, searchin every possible panel ... Cannot realy be its normal behaviour that the form never dissapears, can it ?

GreyHead 23 Jan, 2010
Hi Dennis,

What you want is exactly the way that ChronoForms behaves unless you have set it up to do something different. Are you using the Plugin or Module?

If you have the form in a Module on *every* page then - yes it will reappear on the thank you page unless you turn it off for that page.

lab5 23 Jan, 2010
Ahaaaaaa🙂 It's becourse it's expressed in a module ! Hmmm.
Soo - if i'm getting you right - even if i hav the form only on one page it will reappear unless i set an "After Submission URL", right ?

Hmmmmmm... If i was eager to adjust the behaviour of the component wehen expressed via module:
what files would you recomment me analyse / look in ? Are you able to give me a hint right off the cuff ? I'd be quite grateful havin such already before i start ( start will be later on that very night probably ( but not yet that sure ... depends ^^)= I'm allready working on a ServerSideValidation-Plugin that hopefully will be ready soon ^^) ).

Thanx so far anyway ^^)
and : Great job !


Hmm. So actually what i want to modificate is:
new behavoiur: Do NOT show Form when data is accepted ( no errors, even on serverside ) ant therefore is successfully sent. Simply dont display the forma in this case after all...
Any hint how/where to accomplish/realize in the code before i hav to go into the guts of 35 pages of code that even i don't have written myself ?
( And: you want me to send u the respective modifications 4 in case u want to implement them ? ).

GreyHead 23 Jan, 2010
Hi gekko,

The simplest way is to check the page URL at the beginning of the Form HTML
if ( !$mainframe->isSite() ) { return; }
$chronoformname = JRequest::getString('chronoformname', '', 'get');
if ( $chronoformname == 'my_form_name' ) {

This will display an empty module instead of the form.

lab5 23 Jan, 2010
I see ^^ nice simple idea / workaround, BUT: ^^)

If someone has a serversideValidation in whatever way realized, this GET-var will also be contained in the URL. This causes a problem in the case, when the forms serverside-script returns errors.
In that case the form would be gone instead of getting displayed and informin the user about the fields he has to correct...
If ppl have JS on that case will hardly ever appear, but for those who dont hav it on.
And the serverSideValidation is simply necessary 4 my humble oppinion, becourse toherwise spammers seem to love unprotected forms. ( That is why i've devoted myself to creation a the already mentioned ServerSiderValdation-Plugin for Chronoforms. I think it's a real contribution. Sure will be GNU ).

EDIT: Also see the EDIT that i appended in the former post - as it seems - RIGHT THE SAME TIME you postet your reply ^^
GreyHead 23 Jan, 2010
Hi gekko,

True, I'd need to think some more about how to trap that.

BTW ChronoForms already has Server-side validation - at least in a basic form.

lab5 23 Jan, 2010
You mean the Field in the BackEnd fo chronoforms, where you can insert a php-code ?
Then: Yeah but ppl still have to white the code for themselves then, and i think only few of those using chronoforms are even capable of skripting their own validation code.

If you ment something else : hell where ? sure i wouldn't wanna write a plugin completely in vein !
GreyHead 23 Jan, 2010
Hi gekko505,

Yes that's the one I had in mind.

lab5 24 Jan, 2010
At least for the problem when using chronoform in a module ( that is that the form will still get displayed after successfully sending data and mail ) i found a very simple salution:


1. goto the HTML-code of your form and embrace it in a div-tag with an id-attribute
( in my case/example it's id="chrono_form" )

2. next you go to the tab "Form Code" and to the "On Submit code - after sending email" -section and insert a simple, additional CSS-code, that will un-display the form. In my case/example that is:

<style type="text/css">
    #chrono_form { display:none;}

that's all, that's it😀

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