Hi,
first of all, I am not a programmer, but I use the handed tools, forum solutions and logic to make things work for me. Also for breezing forms.
So I managed to make a form that calculates a score based on questions, and to 'echo' the total score on the thank you page after submitting, using the session variable in 'Before form' and 'End Submit' .
Now the part I can not figure out.
On the thank you page I have three sections with different text. All three are hidden (via checkbox turn off ).
Based on the total score I want the according section to show. I figured I have a variable that already shows the total score on the thank you page, so it should be possible to do that based on that variable.
END SUBMIT is
$this->execPieceByName('ff_InitLib');
$session = JFactory::getSession();
$myscore = ff_getSubmit('teltotaal');
$session->set('myscore', $myscore);
BEFORE FORM is
$this->execPieceByName('ff_InitLib');
$session = JFactory::getSession();
if( JRequest::getInt( 'ff_status', -1 ) == 0 ) {
$totalscore = $session->get('myscore', $myscore);
echo 'Uw score is '.$totalscore;
}
So when $totalscore <= 5 show section A
when $totalscore >=9 show section B
else show section C
It sounds so logical, who can help me out?