<select name="height"> <option value="[[!If? &subject=`[[+height]]` &operator=`EQ` &operand=`65` &then=`[[+height]]" selected="selected` &else=`65`]]">6'5" or taller</option> <option value="[[!If? &subject=`[[+height]]` &operator=`EQ` &operand=`64` &then=`[[+height]]" selected="selected` &else=`64`]]">6'4"</option> <option value="[[!If? &subject=`[[+height]]` &operator=`EQ` &operand=`63` &then=`[[+height]]" selected="selected` &else=`63`]]">6'3"</option> <option value="[[!If? &subject=`[[+height]]` &operator=`EQ` &operand=`62` &then=`[[+height]]" selected="selected` &else=`62`]]">6'2"</option> <option value="[[!If? &subject=`[[+height]]` &operator=`EQ` &operand=`61` &then=`[[+height]]" selected="selected` &else=`61`]]">6'1"</option> <option value="[[!If? &subject=`[[+height]]` &operator=`EQ` &operand=`60` &then=`[[+height]]" selected="selected` &else=`60`]]">6'0"</option> <option value="[[!If? &subject=`[[+height]]` &operator=`EQ` &operand=`511` &then=`[[+height]]" selected="selected` &else=`511`]]">5'11"</option> <option value="[[!If? &subject=`[[+height]]` &operator=`EQ` &operand=`510` &then=`[[+height]]" selected="selected` &else=`510`]]">5'10"</option> <option value="[[!If? &subject=`[[+height]]` &operator=`EQ` &operand=`59` &then=`[[+height]]" selected="selected` &else=`59`]]">5'9"</option> <option value="[[!If? &subject=`[[+height]]` &operator=`EQ` &operand=`58` &then=`[[+height]]" selected="selected` &else=`58`]]">5'8"</option> <option value="[[!If? &subject=`[[+height]]` &operator=`EQ` &operand=`57` &then=`[[+height]]" selected="selected` &else=`57`]]">5'7"</option> <option value="[[!If? &subject=`[[+height]]` &operator=`EQ` &operand=`56` &then=`[[+height]]" selected="selected` &else=`56`]]">5'6"</option> <option value="[[!If? &subject=`[[+height]]` &operator=`EQ` &operand=`55` &then=`[[+height]]" selected="selected` &else=`55`]]">5'5" or shorter</option> </select>
<option value="65 [[!If? &subject=`[[+height]]` &operator=`EQ` &operand=`65` &then=` selected="selected`]]">6'5" or taller</option>
<select class="select" name="Sector" id="Sector"> <option value="Agencies & Sponsors">Agencies & Sponsors</option> <option value="Clubs & Teams">Clubs & Teams</option> <option value="Education & Charities">Education & Charities</option> </select>
[[!isItSelected? &key=`Sector` &value=`Agencies & Sponsors`]]
$output="";
$itemKey = $scriptProperties['key'];
$itemValue = $scriptProperties['value'];
$userId = $modx->getOption('userId',$scriptProperties,false);
$user = $modx->getObject('modUser',$userId);
$profile = $user->getOne('Profile');
// Get extended profile
$extended = $profile->get('extended');
if ($extended[$itemKey] == $itemValue){
$output = "selected";
}
return $output;
$output="";
$itemKey = $modx->getOption('key', $scriptProperties, null);
$itemValue = $modx->getOption('value', $scriptProperties, null);
if ($itemKey == null || $itemValue == null) {
return;
}
$userId = $modx->getOption('userId',$scriptProperties,false);
$user = $modx->getObject('modUser',$userId);
$profile = $user->getOne('Profile');
// Get extended profile
if ($profile) {
$extended = $profile->get('extended');
if ($modx->getOption($itemKey, $extended) == $itemValue) {
$output = 'selected="selected"';
}
}
return $output;
$userId = $modx->getOption('userId',$scriptProperties,false);
$user = $modx->getObject('modUser',$userId);
$user = $modx->user;
$id = $modx->user->get('id');