Support » Plugins » [plugin: More Fields] how to check if the custom field is empty

  • 0 down vote favorite

    Ok I have a drop down box and I’m using the more fields plugin for word press to print out a http:// address that is entered on the post screen. The more fields plugin gives this code to print out the custom text field.

    <?php meta('guys'); ?>

    I need to check the custom fields to see if a address has been entered. If one has been entered it will show the in the drop down if not it will not show it. here is my code.

    <form name="jump" >
    <p align="left">
    <select name="menu" style="width: 260px;">
    <?php if(class_exists( 'guys') && meta('guys')) :?>
    <option value="<?php echo meta('guys'); ?>">GUYS</option>
    <?php endif; ?>
    <?php if(class_exists( 'girls') && meta('girls')) :?>
    <option value="<?php echo meta('girls'); ?>">Girls</option>
    <?php endif; ?>
    <?php if(class_exists( 'other') && meta('other')) :?>
    <option value="<?php echo meta('other'); ?>">GUYS AND GIRLS</option>
    <?php endif; ?>
    <input type="button" onClick="[].value;" value="GO" style="padding: 0px 5px;">

    for some reason its not working even when i enter text for the field nothing shows up ?

  • The topic ‘[plugin: More Fields] how to check if the custom field is empty’ is closed to new replies.