How to show popup message in form validation?

twscott

Member
Hi,
I wrote a php plugin for user input validation, if it's invalidate, I want to popup a message, and show the error message, can someone show me how to do this?
Thanks in advance

Best Regards
Scott
 
When you say you wrote a plugin, do you mean you created a validation (or maybe form) plugin from scratch, or you are using the PHP validation (or form) plugin?

-- hugh
 
Thanks, It was a php plugin, but the purpose was like validating user password than according to the input redirect user to different pages.
 
I switched to element validation, if the element is validate, the forward an url.
I put the following code in PHP text area, the strange thing is no matter what I input, the validate result is true but the forwarding never process. Dose any one know what was wrong??

$app = JFactory::getApplication('site');
$session = JFactory::getSession();
$companyAbb = $session->get('myCompany');
$inputpass = $app->input->get('tablename___elementname');

$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('com_compass');
$query->from('igc8d_company_information2');
$query->where('comp_abbreviation = '. $db->quote($compabb));
$db->setQuery($query);
$result = $db->loadResult();
if ($result == &inputpass) {
header("Status: 301 Moved Permanently");
header("Location: http://www.ccfia.org/purity2");
} else
return false;
 
by the way, I put the forwarding code in Form php plugin which runs onBeforeProcessing
but still couldn't be forward.
 
I am too new to fabrik.
Just found that I should use ajax for the requirement.
Thanks to Cheesegrits , your short questions are very inspiring.

Scott
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top