Membership: how to inject form data into CMSB database - more advanced than readme.txt offers

By gregThomas - February 19, 2013 - edited: February 19, 2013

Hi Equinox,

I think your going about this the right way, I would create radio buttons like this:

<?php  $options = getListOptions('category', 'userNum'); ?>

<?php foreach($options as $key => $value): ?>

<label><input type="radio" name="team" value="<?php echo $key; ?>" /><?php echo $value; ?></label><br>

<?php endforeach; ?>

<input type="submit" name="submit" value="Submit" />

</form

You shouldn't need to get the options from the teams table directly, as the getListOptions Function should retrieve the options from that table automatically.

You shouldn't need to use a meta field like label, the $value should contain the label field. If you echo $value, the label field should be displayed as in the example I've given above.

Are you having trouble saving the value to the users record when they submit the form?

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By Codee - February 19, 2013

Thanks, Greg! I'll giv 'er a go.