Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

  • stegtflesk
    Participant

    @stegtflesk

    I solved it with

    	<?php  global $messages_template;?>
    	<?php  echo 'id = '.$messages_template->thread->last_sender_id ?>
    

    Dont know if it is a viable solution though


    stegtflesk
    Participant

    @stegtflesk

    Thx for the replay, but its not the value of the field i need, but the array of options i have created in the wp backend.

    Ex.

    I have created a new profile field in the “User->profile fields” page in the wp backend. Calling it eyecolour.

    So i select the field to be a “select, dropdown” (still in the wp backend). I enter an array of eyecolours as options and saves the field and set the default colour as green. I am now able to extract the value of the field as you shown above. But i wanto get the full array of all the options of the field pref. as and array. Then i would be able to create the dropdown, dynamically in the frontend, using the options i allready created.

    psudocode example (i know its the wrong functions, its just to show the logic):

    $selectedOption = get_profile_field(‘eyecolor’);
    $possibleOptions = get_profile_field_options(‘eyecolor’); //this function i need!! 😛

    foreach ($possibleOptions as $option) {

    if ($option == $selectedOption) {

    echo ‘<option selected value=”‘.$option.'”>’.$option.'</option>’;

    } else {

    echo ‘<option value=”‘.$option.'”>’.$option.'</option>’;

    }

    hope this makes sense 😀

Viewing 2 replies - 1 through 2 (of 2 total)
Skip to toolbar