stop form php on apply

Status
Not open for further replies.

bea

Active Member
Hi,
I couldn't find any solution on Wiki. I need to stop the form php on apply.
My old school script doesn't work ;)
F2:
Code:
$apply = JRequest::getVar('apply', false);
F3?:
Code:
$apply = $formModel->getElementData('apply', false);

and !$apply

Regards
Bianka
 
The way the main code does it is ...

Code:
if (array_key_exists('apply', $formModel->formData)) {
   // do whatever you need to do for an apply
}

Note that JRequest was deprecated years ago, and has been removed in upcoming J! versions. The way to get at inputs is now ...

Code:
$app = JFactory::getApplication();
$foo = $app->input->get('foo', 'default');

... with similar variations of the get() as for the original JRequest, like getInt(), getRaw(), etc.

-- hugh
 
  • Like
Reactions: bea
Many thanks Hugh! It works :)
Sometime it seems, that I've to learn a new language with F3 ....
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top