element validation

No. The var_dump is for debugging and it surely will show nothing else, exit will stop anything (that's the sense of using var_dump();exit; )

You must delete the line with var_dump and exit and change the return statement.
 
Great,
Now I think it works,
So I added the code to the StudentID element as php validation.

$app= JFactory::getApplication();
$StudentID=$app->input->get('mto___StudentID_raw','');
$MTO = $app->input->get('mto___MTO_raw','');
return $StudentID[0] == $MTO;

error.png

Question:

Now if the user add the same ID in the second box, the message on the top of the page shows the record has been added.
But if the user add different number "student id" in the confirmation box "second box" and then hit save. there is no error message shows that the number must match.

I have entered a text in the error message, but still not able to get to show it when the user enter wrong confirmation number.

Please help
 
Hi, any hint please. I would like show error message when the number is not matching. Thank you so much
 
Which link in the frontend?

If it's working in the backend it's pretty sure an issue with your Joomla template e.g. not displaying system messages...
 
when I add the same number, I got the message:
message.PNG
in the very top of the site. :)
but when I add different number it doesn't shows any message in the front end only. so really not sure why. as it seems the system message is already setup, as it shows only when a successful message.
 
ok I think I found the issue, the front end error message only shows to superuser group. as I have logged in as administrator group and the error did not show.
then I logged in back with the super user name. and the error shows as your screen.

How I can enable the error to show to all groups.

Thanks,
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top