At renewal I update their record so the checkbox is un-ticked, meaning they must re-tick it to save their record, and I use the change history data to report if any record has not been re-ticked in last 365 days.
Unfortunately because the mandatory fields apply to both the user and the administrator, when and admin edits the member's profile (or approves a new registrants), they have to remove the mandatory flag against the profile fields or they are forced to fill in the member's fields.
It would be convenient if functionality could be added so administrators could be edit profiles and be immune from mandatory fields, but meanwhile as there are several mandatory fields, it is inevitable that administrators will sometimes forget to restore the mandatory flag.
To make is simpler I have a two SQL statements that
1- updates the value of the usf_mandatory column in the relevant records in the table _user_fields, to 0 before the admin makes profiles changes
2- updates the value of the usf_mandatory column in the relevant records in the table _user_fields, back to 1 after the admin makes profiles changes.
example.
Code: Alles auswählen
UPDATE admnh_user_fields SET usf_mandatory = CASE WHEN admnh_user_fields.usf_id BETWEEN 3 AND 9 THEN 0 WHEN admnh_user_fields.usf_id =10 THEN 0 WHEN admnh_user_fields.usf_id =19 THEN 0 WHEN admnh_user_fields.usf_id BETWEEN 21 AND 26 THEN 0 ELSE usf_mandatory END
I currently execute the SQL from the phpMyAdmin console as my attempt to create a php file failed.
Any suggestions on the PHP I could use so I could execute the SQL changes via a browser and can anyone explain why the changes are not seen in the forms until after the cookies are cleared.
Thanks in advance.