Hidden Input not working (sometimes)

  • 2ndMouse
  • 2ndMouse's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 24
  • Thank you received: 0

2ndMouse created the topic: Hidden Input not working (sometimes)

Hello, I have a form that you have helped me with in the past and I am having an odd issue with the some of the form submissions.

Past Forums related to this form:
crosstec.org/en/forums/40-club-forums-su...e-upload-issues.html
crosstec.org/en/forums/41-breezingforms-...list-and-paypal.html
crosstec.org/en/forums/40-club-forums-su...-checkbox-value.html

There is a select from list option that allows the user to select a “Booth Type” which is where the price of the booth that is sent to PayPal comes from. There are also checkboxes to add additional items to be added to the total price and a file upload section right before submit. The submissions are working fine, as are the admin emails and mailback emails about 90% of the time. About 10% of the time the value that is selected in the booth type drop down, which is then saved in a hidden input is not saved. The dollar amount is saved and passed to PayPal, but the record and the emails do not show what type of booth was purchased. I thought it may be due to some people clicking the submit button multiple times, however I have a had a few submissions that were only submitted once and the issue still happened. I have tried to replicate the issue myself and have not been able to.

I have attached a package of the form to this post.

Thank you,
Courtney
#196424
Attachments:
  • Posts: 2222
  • Karma: 44
  • Thank you received: 279

marko.bosnjak replied the topic: Hidden Input not working (sometimes)

Hi Courtney,

I've inspected your file.
Those emails are not showing up, because you have several identical values in your select list like 126, 252, 207 and so on. It's causing confusion in the code and that's the reason why it doesn't proceed.
If you make some adjustments in those values, I'm sure you wont have a problem.

Regards,
Marko

======================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
======================================
Need to renew Pro Support?
Buy Here!
======================================
Satisfied?
Consider a Membership!
======================================
Follow us on Facebook!
#196489
  • 2ndMouse
  • 2ndMouse's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 24
  • Thank you received: 0

2ndMouse replied the topic: Hidden Input not working (sometimes)

I wondered if that what it was. Since I can't change the actual amount, is there a way I can add something to it where it will still process the value? Something like "Craft Booth | 207.00 |0" ?
#196499
  • 2ndMouse
  • 2ndMouse's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 24
  • Thank you received: 0

2ndMouse replied the topic: Hidden Input not working (sometimes)

Or would "207.00" and "207" be considered different from one another?
#196502
  • Posts: 2222
  • Karma: 44
  • Thank you received: 279

marko.bosnjak replied the topic: Hidden Input not working (sometimes)

Hi,

I ran some tests. "207" and "207.00" are considered different one from another so you can use that without really changing the exact amount. Also, you can use "207.0", "207.00", "207.000" and so on. They are all different one from another.

If you want for your email to show values round to 2 decimal places do the following.
In your "total" field > Initscript delete the previous code and paste this one:
function ff_total_action(element, action)
{
if (ff_getElementByName('electric').checked){
var x=0;
x = Number(ff_getElementByName('chooseBoothType').value) + Number(ff_getElementByName('electric').value);
ff_getElementByName('total').value = x.toFixed(2); }
else{
var y=0;
y = Number(ff_getElementByName('chooseBoothType').value);
ff_getElementByName('total').value = y.toFixed(2);}
}

Let me know if you have more questions.

Regards,
Marko

======================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
======================================
Need to renew Pro Support?
Buy Here!
======================================
Satisfied?
Consider a Membership!
======================================
Follow us on Facebook!
#196560
  • 2ndMouse
  • 2ndMouse's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 24
  • Thank you received: 0

2ndMouse replied the topic: Hidden Input not working (sometimes)

I am having issues again with the Hidden Input not saving sometimes in the records or being sent in the Admin or Mailback emails. I have narrowed it down and it seems to only be happening when the user submits from an iPad. MacBooks and iPhones seem to work fine. The following is my ActionScript for the Select From List element (chooseBoothType) that is tied to the Hidden Input (text)

function ff_chooseBoothType_action(element, action) {
switch (action) {
case 'change':
ff_total_action(element, action);

if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "207") {

jQuery('[name="ff_nm_text[]"]').val("Craft Single Booth - $230 (10'x10') Pay in Full");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "103.50") {

jQuery('[name="ff_nm_text[]"]').val("Craft Single Booth - $230 (10'x10') Pay 50% Deposit");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "414.00") {

jQuery('[name="ff_nm_text[]"]').val("Craft Double Booth - $460 (10'x20') Pay in Full");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "207.0") {

jQuery('[name="ff_nm_text[]"]').val("Craft Double Booth - $460 (10'x20') Pay 50% Deposit");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "252") {

jQuery('[name="ff_nm_text[]"]').val("Craft Corner Booth - $280 (10'x10') Pay in Full");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "126") {

jQuery('[name="ff_nm_text[]"]').val("Craft Corner Booth - $280 (10'x10') 50% Deposit");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "504") {

jQuery('[name="ff_nm_text[]"]').val("Craft Double Corner Booth - $560 (10'x20') Pay in Full");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "252.0") {

jQuery('[name="ff_nm_text[]"]').val("Craft Double Corner Booth - $560 (10'x20') Pay 50% Deposit");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "252.00") {

jQuery('[name="ff_nm_text[]"]').val("Craft Wall Booth - $280 (10'x10') Pay in Full");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "126.0") {

jQuery('[name="ff_nm_text[]"]').val("Craft Wall Booth - $280 (10'x10') Pay 50% Deposit");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "378.00") {

jQuery('[name="ff_nm_text[]"]').val("Craft Wall Booth & Half - $420 (10'x15') Pay in Full");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "189.00") {

jQuery('[name="ff_nm_text[]"]').val("Craft Wall Booth & Half - $420 (10'x15') Pay 50% Deposit");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "504.0") {

jQuery('[name="ff_nm_text[]"]').val("Craft Wall Booth - $560 (10'x20') Pay in Full");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "252.000") {

jQuery('[name="ff_nm_text[]"]').val("Craft Wall Booth - $560 (10'x20') Pay 50% Deposit");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "252.0000") {

jQuery('[name="ff_nm_text[]"]').val("Craft Wall Booth 5'x20' - $280 (5'x20') Pay in Full");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "126.00") {

jQuery('[name="ff_nm_text[]"]').val("Craft Wall Booth 5'x20' - $280 (5'x20') Pay 50% Deposit");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "297") {

jQuery('[name="ff_nm_text[]"]').val("Gourmet Row Booth - $330 (10'x10') Pay in Full");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "148.50") {

jQuery('[name="ff_nm_text[]"]').val("Gourmet Row Booth - $330 (10'x10') Pay 50% Deposit");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "594.00") {

jQuery('[name="ff_nm_text[]"]').val("Gourmet Row Double Booth - $660 (10'x20') Pay in Full");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "297.0") {

jQuery('[name="ff_nm_text[]"]').val("Gourmet Row Double Booth - $660 (10'x20') Pay 50% Deposit");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "229.5") {

jQuery('[name="ff_nm_text[]"]').val("Commercial Single Booth - $255 (10'x10') Pay in Full");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "114.75") {

jQuery('[name="ff_nm_text[]"]').val("Commercial Single Booth - $255 (10'x10') Pay 50% Deposit");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "459.00") {

jQuery('[name="ff_nm_text[]"]').val("Commercial Single Booth - $510 (10'x20') Pay in Full");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "229.50") {

jQuery('[name="ff_nm_text[]"]').val("Commercial Single Booth - $510 (10'x20') Pay 50% Deposit");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "274.5") {

jQuery('[name="ff_nm_text[]"]').val("Commercial Corner Booth - $305 (10'x10') Pay in Full");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "137.25") {

jQuery('[name="ff_nm_text[]"]').val("Commercial Corner Booth - $305 (10'x10') Pay 50% Deposit");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "274.50") {

jQuery('[name="ff_nm_text[]"]').val("Commercial Wall Booth - $305 (10'x10') Pay in Full");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "137.250") {

jQuery('[name="ff_nm_text[]"]').val("Commercial Wall Booth - $305 (10'x10') Pay 50% Deposit");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "411.30") {

jQuery('[name="ff_nm_text[]"]').val("Commercial Wall Booth & Half - $457 (10'x15') Pay in Full");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "205.65") {

jQuery('[name="ff_nm_text[]"]').val("Commercial Wall Booth & Half - $457 (10'x15') Pay 50% Deposit");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "549.00") {

jQuery('[name="ff_nm_text[]"]').val("Commercial Double Wall Booth - $610 (10'x20') Pay in Full");
} else if (jQuery('[name="ff_nm_chooseBoothType[]"').val() == "247.50") {

jQuery('[name="ff_nm_text[]"]').val("Commercial Double Wall Booth - $610 (10'x20') Pay 50% Deposit");
} else {
jQuery('[name="ff_nm_text[]"]').val("");

}

break;
default:
;
} // switch
} // ff_chooseBoothType_action

Any thoughts why an iPad wouldn't be able to process this?
#219140
Moderators: ForumSupporttomeperica
Time to create page: 0.073 seconds

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans & templates!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here