Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › Can I require or make mandatory the Collect Customer Input field?
- This topic has 18 replies, 12 voices, and was last updated 6 years, 6 months ago by sahmcolorado.
-
AuthorPosts
-
February 10, 2011 at 12:02 am #2678kellisMember
First I’d like to say I love your plugin and it just keeps getting better and better!
I was wondering if there is a code tweak to make the customer input form field I added become mandatory/required? I am using the fancy1 short code (but removed the thumbnail). Right now, they can leave that field blank and still add to the cart, but we really need to collect the name for the ticket.
Here is the proofing site:
[http://173.192.111.12/~hlfwpweb/news-events/annual-author-dinner-2011/]
Thanks!
February 10, 2011 at 6:45 am #28894amin007ParticipantYeah you can do this with a simple code tweak.
Open the “lib/eStore_read_form.js” file and add the following block of code at the beginning of that file:
jQuery(document).ready(function($) {
$('.eStore-button-form').on('submit', function() {
var $thisbuttonform = $(this);
var custom_input = $thisbuttonform.find('.eStore_collect_input').val();
if(!custom_input.trim()){
alert('Please enter a value in the custom input field');
return false;
}
});
});February 11, 2011 at 1:22 am #28895kellisMemberThat worked great! Thanks for the quick response. I really appreciate it and feel very good about choosing your plugins over others.
Thanks!
February 21, 2011 at 3:44 pm #28896uNeedStuffSpectatorThanks, this was 1/2 of what I was just searching for. Is there a way to make the box bigger? Or allow it to accept more text?
February 21, 2011 at 11:53 pm #28897IvyMemberHi, Since this information is passed via PayPal there is a limit on the number of characters that can be passed. If you need more space you would need to use the PayPal note to seller option. Or maybe put a form for them to fill out on the thank you page so they can submit the information you need?
February 28, 2011 at 1:10 pm #28898winningMemberHi Ivy,
What is limit on number of characters that can be passed to PayPal or authorize.net? We use authorize.net.
Is the following text too long to pass?
3-month membership (1 person) Start Date:02/23/2011 Member Name(s):First_Name Last_Name.
Thanks!
March 1, 2011 at 12:24 am #28899amin007ParticipantAuthorize.net has a limit of 31 characters for item name (this is different than PayPal).
I don’t think this will matter though because eStore handles the authorize.net transaction slightly differently so your item names of upto 255 characters will work fine.
March 28, 2016 at 5:14 pm #28900actonMemberCan someone please confirm that this file (“lib/eStore_read_form.js”) is still the correct place to be making changes? I’ve pasted in the suggested handler and nothing is happening. Even if I put garbage in the top of the file, the site doesn’t break. I’m definitely ctrl-refreshing….
Thanks,
Curran
March 29, 2016 at 4:16 am #28901wpCommerceModerator@acton, Do you have any caching plugin? Please provide a link to the page in question so I can take a look.
April 1, 2016 at 3:36 am #28902adminKeymasterYou have an error in that JavaScript file. When there is an error in a JS code, the whole site’s JavaScript won’t work. Use the following resource to learn how you can see the errors in your JS code:
https://support.tipsandtricks-hq.com/forums/topic/debugging-javascript-errors-on-your-site
I sent you an email with an updated plugin copy for that.
August 2, 2016 at 5:47 am #28903obaninjaMemberWe are in partnership with a company who hosted my data and a customer needs to download their reader and get customer ID which is required to authorize the download from their server. The customer Id will be part of the encrypted data sent in email link to the customer.
Can you help me with a code tweak to make the customer input form field I added become mandatory/required and also add it to the encryption URL I will send to the customer
August 3, 2016 at 4:35 am #28904adminKeymasterMaking the custom input field mandatory is somewhat easy. However the following part will need a custom job:
“add custom input to the encryption URL I will send to the customer”
Please use the following form to get in touch:
July 30, 2017 at 3:37 am #28905rick_odMemberdoes this code still work? i tried it today and had no success. i am interested in making the customer input field required.
thanks!
July 31, 2017 at 2:34 am #28906adminKeymasterYeah that code should still work fine.
I will take a look on your site. I have sent you an email.
August 1, 2017 at 1:21 am #28907rick_odMemberLuke, thanks. i replied.
did you get rid of the other posts? not complaining, just assume we are now working in one place and not over multiple posts.
-
AuthorPosts
- You must be logged in to reply to this topic.