aaelghat
Forum Replies Created
-
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Unable to insert blog.That worked – thank you!
Thank you. I still have an issue where I disconnect from the plugin, but can’t disconnect from the Meta page as demonstrated here: https://www.loom.com/share/6f76f3b76af24a24965dbeb30e237e62
Do you have any ideas about this?
Thanks.
Forum: Plugins
In reply to: [User Switching] Also getting the 502 error…OK, I just solved it. In the nginx conf file, I added the following lines:
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;Forum: Plugins
In reply to: [Inline Google Spreadsheet Viewer] Google Sheets Hyperlink FunctiinOK, I see that the sticky post linked to another post, which said Hyperlink wasn’t supported because Google didn’t export the link.
Indeed, I added the code to my functions.php and the hyperlinks from the HYPERLINK function did not come through.
Thanks for the response.
I am running other add-ons. I will try and clone the site, and turn off some of the other add-ons and see if that makes a difference.
I do have another question… The javascript that performs the calculation still occasionally results in an “unresponsive script” message. The script is below. Do you have any thoughts on that?
Thanks!
<script> var gf_miles_formId = 37; var gf_miles_repeaterId = 1; var gf_miles_childId_milesField = 3; var gf_miles_totalMilesId = 11; var gf_miles_totalPriceId = 12; var gf_miles_pricePerMile = .54; jQuery('#gform_' + gf_miles_formId).on('gform_repeater_init_done gform_repeater_after_repeat gform_repeater_after_unrepeat gform_repeater_update_price', function(event, repeaterId, repeatId){ var milesFields = gfRepeater_select(gf_miles_formId, gf_miles_repeaterId, null, gf_miles_childId_milesField, '*'); var totalMiles = 0; jQuery.each(milesFields, function(){ if (jQuery(this).val()) { totalMiles += Number(jQuery(this).val()); } }); var totalPrice = '$' + Number(totalMiles * gf_miles_pricePerMile).toFixed(2); jQuery('#input_' + gf_miles_formId + '_' + gf_miles_totalMilesId).val(totalMiles); jQuery('#input_' + gf_miles_formId + '_' + gf_miles_totalPriceId).val(totalPrice); updateMilesTrigger(repeatId); }); function updateMilesTrigger(repeatId) { var milesField = gfRepeater_select(gf_miles_formId, gf_miles_repeaterId, repeatId, gf_miles_childId_milesField, '*').first(); jQuery(milesField).on('propertychange change click keyup input paste', function(){ jQuery(this).parents('form').trigger('gform_repeater_update_price'); }); } </script>
Terrific – thank you.
Hi – thanks again for all your hard work, but could I get an update? I need to make some decisions about moving ahead.
Some more information for you:
I get the same results of the form not rendering when there is a conditional field (reimbursement) outside the repeater with either the latest gravityforms-repeater-development or gravityforms-repeater-master.
I figured out how to modify the javascript so the number field “Reimbursement” field doesn’t get updated, but whether it gets updated or not I noticed that the attributes of the field don’t stick when the javascript is there. If I try to format the field as currency, it doesn’t retain the setting after the form is saved, and the range of the number is “false” for the min and max.
I was hoping to do the calculation in the field itself, but that doesn’t work. I can figure out how to format the Reimbursement field as currency in the Javascript (otherwise I get values like $14.580000000000002.
So really the only issue I can’t overcome is that the form doesn’t render when there is a conditional field on the form. Is there a solution to that? If you could give me an answer today, I will know whether I need to break this up into two nearly identical forms.
Thanks again.
Hi, one addendum – if absolutely necessary, I could break the form into two separate forms instead of having the conditional, but I’d have to modify your custom JavaScript to remove the reimbursement calculation.
I tried doing that unsuccessfully (I don’t really know JavaScript), so if I have to break it up into two different forms, could you tell me the JavaScript I would need to use to only calculate the total miles?
As an alternative to calculating the reimbursement in a script, can that be done as part of the regular Gravity Form number calculation feature since the input is a non-repeater field?
Thank you again for all your hard work.
You are correct – it is working great now. Thanks for writing the Javascript – you provide terrific service and support!
Thanks for the revised code.
It is still very laggy and the page becomes unresponsive… https://goo.gl/0Nx34M
One thing I noticed in the script is that you are calculating total price. If you notice, it is very laggy clicking from one mileage field to another, and that’s what triggers the unresponsive message. If it helps, I can calculate the price by using the calculation option of the numeric field.
Unfortunately I don’t know javascript well enough to know why it slows down…
It’s much closer… I copied in the script and the only issue is that if I try it from a computer I get the message below when I enter the mileage for the second line… If I try it using Safari on an iPhone it is very laggy. Eventually the numbers get added together, but then the form reloads on the iPhone and it says “A problem occurred with this web page so it was reloaded”.
A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue.
Hi – this is the OP. Thanks again for the javascript code.
I implemented it, but it’s not summing up the miles. It looks like it’s being read because now the Reimbursement field (which is to the right of the Total field) is displaying the css class instead of the placeholder (which obviously isn’t correct). So it looks like the code is being interpreted, but not in the way intended?
Thanks.
Thank you for the hard work to put that together! Dumb question… Where do I out the javascript code?
Thanks in advance.
The issue might have been a caching issue. Everything looks good now…
One other question… You’ll see that the form has a calculated number field of “Total Miles”. How do I total up the individual “Miles” fields in the “Total Miles” field? Thanks in advance.