WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Can I include HTML in a custom field's value? (2 posts)

  1. PatBarrettcomnetorginfo
    Member
    Posted 4 years ago #

    I'm trying to write a couple cells of an HTML table into my custom field, so that I can dynamically add options to a PayPal button. Here's my code on index.php:

    <table>
     <?php $options = "get options"; echo get_post_custom_values('options'); ?>
    <td><input type="image" src="https://www.paypal.com/en_US/i/btn/btn_cart_SM.gif" border="0" align="middle" name="submit" alt="PayPal - The safer, easier way to pay online!"><img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
    </td>
    </table>

    The value for "options" is:

    <td>
    <input type="hidden" name="on0" value="Signed?">Signed?</td><td><select name="os0">
    	<option value="yes">yes </option>
    	<option value="no">no </option>
    </select> </td>
    <td><input type="hidden" name="on1" value="Inscription [ optional ]">Inscription [ optional ]</td><td><input type="text" name="os1" maxlength="60"></td>

    All this does right now is display the word "array" (http://shop.patbarrett.com). Does anybody know anything else I should be doing?

    Thanks.

  2. PatBarrettcomnetorginfo
    Member
    Posted 4 years ago #

    I've realized I should have been using
    <?php $options = "get options"; echo get_post_meta($post->ID, 'options', true); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic