How to add Customfield1 values as select option for customfield2 fo registration
-
Hi,
I’m having two customfields.
customfield1 = text
customfield2 = select
as registration fields.
i need customfield1 values entered already by different users must be listed as select box option for customfield2.I tried altering pie-register.php coding to get
<?php if( $v[‘fieldtype’] == ‘select’ ){
$ops = explode(‘,’,get_user_meta(’10’,’referral_id’));
$options=”;
foreach( $ops as $op ){
$options .= ‘<option value=”‘.$op.'” ‘;
if( $_POST[$id] == $op ) $options .= ‘selected=”selected” ‘;
$options .= ‘>’ . $op . ‘</option>’;
}
?>
<p class=”<?php get_user_meta(’10’,’referral_id’); ?>”><label for=”<?php echo $id;?>”><?php echo $v[‘label’];?>:
<select class=”custom_select” name=”<?php echo $id;?>” id=”<?php echo $id;?>”>
<?php echo $options;?>
</select></label></p><?php } ?>
but it displays blank. where am i doing mistake?
how to alter coding according to my requirement?
- The topic ‘How to add Customfield1 values as select option for customfield2 fo registration’ is closed to new replies.