-
AuthorPosts
-
August 21, 2018 at 9:09 am #999701
I have created a form with a number of check-boxes (actually, quite a lot of them) as you can see here https://oreflow.com.au/request-free-quote/.
When a user checks one of the boxes, the resulting email looks something like below. Is there a way to make it so that ONLY the items that are checked in the form are sent through, rather than showing ‘false’ on all other fields that weren’t ticked?Name: Benny
E-Mail: NAME
Phone: PHONE
Company: COMPANY
Trough Idlers: false
Impact Idlers: false
Return Idlers: false
Poly Idlers: false
Trough Frames: false
Training Frames: false
Adjustable Frames: false
Return Roller Brackets: false
Primary Scrapers: false
Secondary Scrapers: false
Ploughs: false
Skirting Systems: false
Belt Support Systems: false
Air Cannons / Flow Activators: false
Jaw Crushers: false
Cone Crushers Secondary & Tertiary: false
Spare Parts for Jaw Crushers: false
Keyliner Chute Lining Systems: false
Rubber Impact Elements: false
Rubber backed ceramic tiles: false
Head: false
Tail: false
Take Up: false
Refurbishment: false
Lagging: false
Apron Feeder: false
Vibratory Pan Feeders: false
Rubber Screencloths: false
Poly Panels: false
Wide Screencloths: false
Capping Rubber: false
Dust Cloth: false
Other Dust Sealing Components: false
Hot Lining System: false
Cold Lining System: false
Wet Screens: true
Screen Furbishment: false
Bucket Elevators: false
Dry Screens: false
Conveyor System: falseAugust 22, 2018 at 10:04 pm #1000531Hey shanhard,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
( do be sure that we have enough time to debug ). - Click ” Submit “.
- You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.
When your issue is fixed, you can always remove the plugin!
If you prefer to not use the plugin, you can manually create a admin user and post the login credentials in the “private data” field.Best regards,
BasilisAugust 23, 2018 at 4:44 pm #1000831Details added to private. Thanks for your attention.
August 26, 2018 at 12:19 pm #1001850Hi,
I added this code to your child theme functions.php to solve the issue:
add_filter('avf_form_mail_form_field', 'avia_change_checkbox_form_values', 10, 7); function avia_change_checkbox_form_values($form_field, $new_post, $form_elements, $form_params, $element, $key, $field_value) { if($field_value == 'false') $form_field = ''; return $form_field; }
I also had to patch the enfold/framework/php/class-form-generator.php with a new filter (modified code: https://pastebin.com/raw/k4KiZK0z ).
The next theme update should include the patched class-form-generator.php and the child theme code will also work with future updates.
Best regards,
Dude -
AuthorPosts
- You must be logged in to reply to this topic.