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:
Any Idea? Thanks for your support.
BR
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
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
Any Idea? Thanks for your support.
BR