php - MODX FormIt overriding POST values -


i trying modify posted phone number using custom hook, reason value isn't changed. here hook:

require '/components/vendor/autoload.php'; $phoneutil = \libphonenumber\phonenumberutil::getinstance();  $phone = $hook->getvalue('phone'); $country = $hook->getvalue('country');  $numberproto = $phoneutil->parse($phone, $country);  $formated = $numberproto->getnationalnumber(); $code = $numberproto->getcountrycode();  $formatedphone = '+'.$code.$formated;  $hook->setvalue('phone', $formatedphone); return true; 

so, taking phone field, populate code , set value back. can see, works fine (by dumping data) until $hook->setvalue('phone', $formatedphone);

what's problem here?

so, fine actually. looking @ post data via network tab, real posted data fine.


Comments

Popular posts from this blog

java - Unable to make sub reports with Jasper -

scala - play framework: Modules were resolved with conflicting cross-version suffixes -

Passing Variables from AngelScript to C++ -