Forum Replies Created
-
AuthorPosts
-
@mindspark
Participantthank you!
@mindspark
ParticipantHi Long -
after uploading the new file you sent - the it works for about 3-5 minutes then same issue.
Note - Your file omits a few form fields which I tried to add back using MB - but something else is happening...
thoughts?
@mindspark
Participantany update?
@mindspark
ParticipantThank Long!
Here is the file: https://drive.google.com/file/d/1IrXCuBVWuAN02V3dpF07Z6AnBr7kheWY/view?usp=sharing
@mindspark
ParticipantThank you Long! I wanted to share my solution.
my form has 3 fields that receive user inputs, and they are part of a group so they can be cloned:
Group => group_locations
Field 1 => shift_hours
Field 2 => total_number_guards
Field 3 => proposed_rateI added a MB button field to run the calculation
And display the result in a separate field:
Total Price => proposed_cost
jQuery(document).on('click', 'button[id^="pricing_group_locations_button_"]', function() { console.log('here'); let wrapper = jQuery(this).closest('.rwmb-group-clone'); let shift_hours = wrapper.find('input[name<em>="shift_hours"]').val(); let guards = wrapper.find('input[name</em>="total_number_guards"]').val(); let proposed_rate = wrapper.find('input[name<em>="proposed_rate"]').val(); wrapper.find('input[name</em>="proposed_cost"]').val(shift_hours * guards * proposed_rate); let sum = 0; jQuery('input[name*="proposed_cost"]').each(function(index, item){ console.log(item) sum += parseFloat(item.value) }) jQuery('#pricing_total_pricing').val(sum); });September 16, 2021 at 6:55 PM in reply to: Creating Signature Field for MB Frontend Submission #30793@mindspark
ParticipantHi Long -
thanks for the reply. I found this on Codepen - https://codepen.io/yguo/pen/OyYGxQ
it uses HTML, JS, and a little CSS to create a signature field. I think its a good start to investigate a custom implementation, but it would definitely be better if either MB provided this as a dedicated field type.
But I'm also exploring making my own custom MG field type.
Please let me/us know how the team responds to this request.
Thanks!
September 9, 2021 at 7:31 AM in reply to: ✅Using Gravity Forms and Metabox for simple event bookings #30673@mindspark
ParticipantThanks!
@mindspark
Participantthanks Long. that did the trick!
@mindspark
ParticipantThank you!
@mindspark
Participantsorry for this clarification - are you saying that field meta for all 3 of these field types is serialized?
- list field text
- fieldset text
- group
or only
- fieldset text
- group
Thanks
@mindspark
ParticipantExcellent idea to create a custom field type!
thanks for the article on Hotel Booking. I'll check it out.
@mindspark
ParticipantSo if I use a text list field (not fieldset and not group) then the meta is saved and related to the post?
@mindspark
ParticipantFor adding custom taxonomies to WP Users in backend
Here you go. Found this article and it actually worked. I don't love the format of the new taxonomy form <multi> select. I think a radio list would be better.
enjoy! thanks for all your help Lon 🙂
@mindspark
Participantthank you Long!
@mindspark
ParticipantSorry for this late reply - thanks for the explanation. I'll experiment with this a little and report back to you.
I think your example may not be a perfect solution, because in this case all data input is done by the user via the backend, so in my application, we are not using Blocks and our sub-fields are a financial table where the user is entering about 15 records.
I'll come back after more consideration.
thanks!
-
AuthorPosts