Custom Field Form, How to Use
-
Hi,
I added some extra fields for my checkout page, but I am confused how to actually retrieve the data entered there (for example, how to put the gamer tag in the confirmation emails that I will send). Here’s the code I use to make the custom fields:
add_filter( 'mt_cart_custom_fields', 'my_custom_fields', 10, 3 ); function my_custom_fields( $custom_fields, $cart, $gateway ) { $custom_fields['tag'] = '<p class="tag"><label for="tag">Gamer Tag</label> <input type="text" name="tag" id="tag" /></p>'; $custom_fields['country'] = '<p class="country"><label for="country">Country (required)</label> <input type="text" required name="country" id="country" /></p>'; return $custom_fields; }
Thanks.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Custom Field Form, How to Use’ is closed to new replies.