Calc-Element: when Orig. Field has Input Mask -> Ajax calculation does not work

wuschel_lux

Member
Hi all,

I have a problem with calculation.
I have e field with a so called "Matricule" (Format: YYYY MM DD XXX YY). With a calculation field I would like to deduct the Birthdate.
The field Matricule is:
  • plugin: Field
  • format: text
  • validation: notempty
  • Input Mask: 9999 99 99 999 99
The Calculation
PHP:
$input = '{mam_user_accounts___matricule}';
$myYear = substr($input,0,4);
$myMonth = substr($input,5,2);
$myDay = substr($input,8,2);
$returnVal = $myDay.'.'.$myMonth.'.'.$myYear;

return $returnVal;
  • Ajax calculation = YES
  • Ajax observe fields = {mam_user_accounts___matricule}
  • Calc on load = YES
If I remove the Input Mask from Matricule it works fine...

Any Idea? Thanks for your support.

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

Thank you.

Members online

Back
Top