How to get data from a textarea element -php

Hi guys,

I am trying to get data from a text area to perform php validation to confirm that the input is correct before the form is submitted.

I am fetching the data from the textarea using this code as string but I keep getting the default i.e. empty string even when the text area has text

$reason_for_decline = $app->input->get('invoice_central__reason_for_decline','','string');

Do I have the syntax wrong here. When I use var_dump() on this variable I get string(0) ""

Regards
Simon
 
It should be working.
Make sure there's no typo in your element name.
Test with some string as default in the ->get...
If var_dump is showing this default string it doesn't know the element name.
 
:mad::mad::mad: You are right Hugh. I had 2 underscores in my element instead of 3...that is 1 hour I will never get back in my life. Such a rookie mistake. Anyway thanks dude

Regards
Simon
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top