Move up the user attribute fields
Permalink Browser Info Environment
How can I move up the user attribute fields on the signup form, so that it shows up right before the email address field?
Type: | Discussion |
---|---|
Status: | New |
I tried that, but nothing changed.
Sorry, I had to clear my cache. It works just fine now. I made a mistake deleting the attribute section of that file on accident. Is their anyway that I can get this back? Maybe you could post or pm me just that part of the code. Thanks!
you could just download it again, but here it is:
<? if(count($userAttrIds)){ ?>
<div class="mailing-list-user-attrs">
<? foreach($userAttrIds as $userAttrId){
$userAttr = UserAttributeKey::getByID(intval($userAttrId));
if(!is_object($userAttr)) continue;
if(is_object($ui)) $vo=$ui->getAttributeValueObject($userAttr);
else $vo=false;
$hasAttrs=1;
?>
<div class="mailing-list-user-attr">
<label><?=$userAttr->getAttributeKeyName() ?>
<?= ($controller->attrsRequired) ? '<span class="required">'.t('*').'</span>' : '' ?>
</label>
<?
//$vo = $uo->getAttributeValueObject($userAttr);
echo $userAttr->render('form', $vo, true);
?>
</div>
<? } ?>
</div>
<? } ?>
<? if(count($userAttrIds)){ ?>
<div class="mailing-list-user-attrs">
<? foreach($userAttrIds as $userAttrId){
$userAttr = UserAttributeKey::getByID(intval($userAttrId));
if(!is_object($userAttr)) continue;
if(is_object($ui)) $vo=$ui->getAttributeValueObject($userAttr);
else $vo=false;
$hasAttrs=1;
?>
<div class="mailing-list-user-attr">
<label><?=$userAttr->getAttributeKeyName() ?>
<?= ($controller->attrsRequired) ? '<span class="required">'.t('*').'</span>' : '' ?>
</label>
<?
//$vo = $uo->getAttributeValueObject($userAttr);
echo $userAttr->render('form', $vo, true);
?>
</div>
<? } ?>
</div>
<? } ?>
One last question, how do I get the text "name" to show up to the left of the box to match the email box above it?
I figured this out. All I had to do was delete the following line out of the mailing_list.css file.
.MailingListSubscribe .mailing-list-user-attr label { display:block; }
<? if( !$u->uID ){ ?>
<div class="mailing-list-email-wrap">
<?=t('Email:') ?>
<? if($controller->attrsRequired || count($userAttrIds)){ ?>
<span class="required"><?=t('*')?></span><? } ?>
<input name="email" type="text" value="<?= htmlentities( $_REQUEST['email'], ENT_QUOTES, 'UTF-8') ?>" />
</div>
<? }else{
$ui = UserInfo::getById($u->uID);
} ?>
..down so it's right above the:
<input name="Submit" type="submit" value="<?=t('Sign-up »') ?>" />