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>
</div>
<?php $priceadult = get_field( "price-adult" ); ?>
<?php $name = get_the_title( '', ' (adult)' ); ?>
<?php echo print_wp_cart_button_for_product($name, $priceadult); ?>
</div>
<?php endif; ?>
'
----/ end code
Thanks for any help anyone can suggest :)
http://wordpress.org/extend/plugins/wp-ultra-simple-paypal-shopping-cart/