Created
November 14, 2020 09:56
-
-
Save ig0r74/253aeb2135abf662ebf4ef40aa855f0a to your computer and use it in GitHub Desktop.
MODX Login UpdateProfile dob hook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dob = $hook->getValue('dob'); | |
if (!empty($dob)) { | |
$hook->setValue('dob', strtotime($dob)); | |
} | |
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input class="{if $_modx->getPlaceholder('error.dob')} error{/if}" | |
type="text" name="dob" value="{$_modx->getPlaceholder('dob') | date : 'd.m.Y'}" placeholder="Дата рождения"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment