Skip to content

Instantly share code, notes, and snippets.

@ig0r74
Created November 14, 2020 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ig0r74/253aeb2135abf662ebf4ef40aa855f0a to your computer and use it in GitHub Desktop.
Save ig0r74/253aeb2135abf662ebf4ef40aa855f0a to your computer and use it in GitHub Desktop.
MODX Login UpdateProfile dob hook
<?php
$dob = $hook->getValue('dob');
if (!empty($dob)) {
$hook->setValue('dob', strtotime($dob));
}
return true;
<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