Hello,
I am looking for a way to set individual fields to read-only for the user when editing the profile, i.e. the user can enter the fields during registration but cannot change them later. Primarily it is about the 4 "free" fields.
Where can I enter this (*.js)?
I also use the AppGini Helper. Is there a possibility here that I have not yet found, despite intensive searching.
By the way: this AppGini Helper is a cool tool.
Thank you !
Christian
User Profile - edit
Re: User Profile - edit
Hi,
I dont think that there is a hook available for that kind of changes. So you would need to edit the membership_profile.php file in order to add your customization.
!! Remeber that this file will be overwritten once you regenerate your app.
I dont think that there is a hook available for that kind of changes. So you would need to edit the membership_profile.php file in order to add your customization.
!! Remeber that this file will be overwritten once you regenerate your app.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: User Profile - edit
You could perhaps try this in hooks/headers-extras.php
Should hopefully change the properties of those fields only on the membership_profile.php page and not effect on any other page.
Code: Select all
<?php
$page_name = basename($_SERVER['PHP_SELF']);
if ($page_name == 'membership_profile.php') {
?>
<script>
$j(function() {
$j('#email').prop('readonly', true);
$j('#custom1').prop('readonly', true);
$j('#custom2').prop('readonly', true);
$j('#custom3').prop('readonly', true);
$j('#custom4').prop('readonly', true);
})
</script>
<?php
}
?>
Re: User Profile - edit
Thank you very much - both solutions work !
Christian
Christian