Hello, What I'm really looking to do is create a separate, secondary profile form for certain subscription levels, as described here: Add an additional Profile Form. Until that's ready, does anyone know if there is a way to set conditionals for the Edit Profile page so that certain fields are only displayed if a user has a specific product? e.g. A bio text field is visible/editable for Premier members, but no one else. Thanks, Scott
Dear Scott, Unfortunately it is not possible right now but in next release we introduce new event Am_Event::SAVED_FORM_GET_BRICKS. This event allow to modify profile form based on current logged in user easily. The necessary code can be located in site.php (http://www.amember.com/docs/Site.php_file) so you will not need to care about it during upgrade. Here is example of code to hide Name brick based on subscription status: PHP: Am_Di::getInstance()->hook->add(Am_Event::SAVED_FORM_GET_BRICKS, 'siteGetBricks'); function siteGetBricks(Am_Event $event){ if ($event->getType() == SavedForm::T_PROFILE) { $bricks = $event->getReturn(); $user = Am_Di::getInstance()->user; if ( !in_array(1, $user->getActiveProductIds()) ) { //remove brick if user has not access to product with id 1 foreach ($bricks as $k => $brick) { /* @var $brick Am_Form_Brick */ if ($brick->getName() == 'Name') { unset($bricks[$k]); } } } $event->setReturn($bricks); }}
You are welcome! Please note this approach will be possible only after next release. In case you can not wait until next release and need to do it in current version please contact us in helpdesk and refer to this ticket. I will help you with it.