PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Inserting select option 'name' via functions.php

  1. GE
    Member

    I'm totally new to php and learning all this on the fly. I've added a number of optional fields and insert them into the Custom Template via code in my functions.php.

    With trial and error, I have everything working and formatted the way I want.

    However, I can't seem to figure out how to pull the actual name of a select option. It just prints the value. Can someone point me in the right direction?

    I'm using this:

    $post->post_content = "$post->post_content\n<i>$entry[3]</i>";

    But it just prints the number.

    Thanks in advance for the help.

    Awesome plugin. Truly the best!

    Posted 11 years ago on Wednesday May 1, 2013 | Permalink
  2. GE
    Member

    I realized for now that because of the order I wish to display this information, I can simply use the merge tag and deal with the other fields with code. On this particular form, my select field comes immediate after the body.

    But I'd still like to understand how to do this with php code. Later I will need to reposition the order of my fields, where a select field comes after fields I am already addressing in code.

    Any help would be much appreciated.

    Posted 11 years ago on Wednesday May 1, 2013 | Permalink