Forums

pass variable from form to jumi-php

dpap 14 May, 2009
Hello,
trying to pass some variables from a form to a php file that i use jumi to display.
Firstly i used $_POST in form and $_GET in the php file but had no solution.
I tried with $_SESSION['var1'] = 'num1'; and $_GET on the php file nothing again.

I have a big form that the user has to answer yes to all and if he answers no to any question i want ot brought him up a javascript window or a simple php file that says "you must answer yes to these questions ...."

Any suggestions......🙄
Max_admin 14 May, 2009

I have a big form that the user has to answer yes to all and if he answers no to any question i want ot brought him up a javascript window or a simple php file that says "you must answer yes to these questions ...."



hi dpap,

you can do this all using Chronoforms, I mean to process the data and show your message, paste your PHP code in the onSubmit box and use the $_POST variables!

let me know how you advance!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
dpap 14 May, 2009
Hi Max,
i'll tell what i've did so please tell me if i'm making a mistake.
I have entered $res2= $_POST['res2'];
on "On Submit code - before sending email:(PHP code with tags)"
where res2 is the name of a radio button.

and i have entered
<?php
echo "$res2";
?>
on "On Submit code - after sending email:(PHP code with tags)"

I left the "Redirect URL:" empty.

With these i'm getting a blank page.
GreyHead 15 May, 2009
Hi dpap,

This code will only show something if (a) the radio button is selected and (b) Send Emails is set to ON in the General Tab (otherwise the OnSubmit before code is not executed) - in which case it should output the value of the button.

If you need Yes answers then JavaScript validation in the client seems to me a better way to do this.

Bob
Max_admin 15 May, 2009
I agree with Bob that its easier to do it in JS, if you need help then let us know!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.