2
ok have kind of got round that problem by creating a new form class
XoopsFormTextDateOfBirth
altho the same problem exists, except i edited the formclass and set the value to '' instead.. this gives a clear text box, which is handy for the registration form.
but i still need to retrieve the value for edituser.php
altho i'm trying to add a small if statement to the form..
what i want is the date of birth field to only be able to be edited once by the user.. they have to set it on registration and that works fine.. but for existing users that are there before i apply the hack means they will not have a current date of birth set.. so i need it to allow editing once.. once it has been set then they can't edit it again (only admin can via admin panel)
here's what i have so far but i can't get it to work right..
mysql date format defaults to 0000-00-00 which is the value of an empty field.
in edituser.php
le="color: #000000"><?php if ($xoopsUser->getVar("user_birth") = '0000-00-00') { $birth_text = new XoopsFormLabel(_US_BIRTH, $xoopsUser->getVar("user_birth")); } else { $birth_text = new XoopsFormTextDateOfBirth(_US_BIRTH, "user_birth", 10, 10, $xoopsUser->getVar("user_birth", "E")); }
i'm not sure i've done it the right way, well i know i haven't or it would have worked. but i can't seem to get the current users date value from the db. i've tried lots of different methods :S