PDA

View Full Version : [BUG] Displaying "Thanks" message


cheesegrits
08-20-2007, 06:33 PM
I puzzled over this one for a while, and am fairly sure the following is correct ...

The tooltip for 'Jump Page' on a form says "if a jump page is entered here the thanks page will not be displayed". Which makes sense. But the code seems to have that backwards (at least in the case where "email to" is set) such that the Thanks will never be displayed:

if ( $this->email_to != "" ){
if ( !$this->_admin ){
# $$$ hugh
#if ( isset( $this->form_submit_jumppage ) && $this->form_submit_jumppage != "" ) {
if( $jumpPage == '' ){
$this->form_submit_message = $this->parseMessageForPlaceHolder( $this->form_submit_message );
fabrik_html_content::displayThanks( $this->form_title, $this->form_submit_message );
} else {
$jumpPage = $this->buildJumpPage( $jumpPage, $Itemid );
mosRedirect( $jumpPage , "" );
}


The original (commented out) line checks to see if a jump page IS set, and if so prints the thanks. In the other case (where email_to is not set, not shown above) it correctly checks for an empty jump page.

The above fix seems to work, everything now happens as I would expect it to.

-- hugh

rob
08-20-2007, 07:10 PM
hi Hugh

Thanks - god know how that ones managed to not be noticed before ::)

mvdw
08-20-2007, 09:55 PM
Hello Hugh

Which file have you changed? I have this problem in rev 142 and would like to have it fixed.

Thanks
Mariana

cheesegrits
08-20-2007, 10:38 PM
Oops, sorry about that ... the file is fabrik.class.php, around line 1145, deep inside the processForm() funtion.

BTW, I tend to say "around line XXX" because my copy of a given file quite often has other changes I've made, so the line numbering may not exactly jive with your copy. So just look for the context with the surrounding lines of code I posted.

-- hugh

mvdw
08-22-2007, 07:28 PM
I have installed rev 151 and found that the problem was resolved.

Thanks
Mariana