Support » Plugin: WordPress Ultra Simple Paypal Shopping Cart » Append text from input to product title?

  • Is it possible to append some data from a text input (or any kind of form input) to the product title?

    I have tried this (code below) but wherever I put $datepicked (my input) it will not add it to the title field. I’m not greatly experienced in PHP coding.

    /—- start code
    ‘ <input type=”text” id=”datepicker” name=”datepicked” />
    <?php $datepicked = $_POST[“datepicked”]; ?>

    <?php if( get_field( “price-adult” ) ): ?>
    <div class=”ticketsection”>
    <div class=”tickettype”>Adult <span>(over 13)</span> <span class=”ticketprice”>£<?php the_field( “price-adult” ); ?></span>
    <?php $priceadult = get_field( “price-adult” ); ?>
    <?php $name = get_the_title( ”, ‘ (adult)’ ); ?>
    <?php echo print_wp_cart_button_for_product($name, $priceadult); ?>

    <?php endif; ?>

    —-/ end code

    Thanks for any help anyone can suggest 🙂

  • The topic ‘Append text from input to product title?’ is closed to new replies.