• Resolved greenrooster

    (@greenrooster)


    Hello,

    First, let me say that I actively use a certain amount of custom code via Forminator hooks to change the default styling of my email notifications from list form to table form. For example:

    Default Email Styling

    <ol>
    <li>
    <strong>Hello</strong>
    World</br>
    </li>
    </ol>
    

    My Email Styling:

    <table>
    <tr>
    <th>Hello&</th>
    <td>World</td>
    </tr>
    <table>
    

    I know this support is not for fixing custom code. However, there is a quirk with number fields and how they translate into emails that I thought I should bring to the forefront. Using my code and {all_fields} or {all_non_empty_fields}, number fields insist on using double decimal places (ex. 2.00) regardless of what decimal place choice I make within the form editor, it always has two decimal places. I removed my code to see how {all_fields} and {all_non_empty_fields} behaved on their own.

    {all_fields} behaves as expected. A number with the proper number decimal places(or lack there of) was displayed. {all_non_empty_fields} on the other hand showed always showed two decimal places after the integer.

    With or without my custom code, this number quirk does not appear to exist when using the number short code directly (ex. {number-1} displays as “2”). Nor does the number quirk appear in the database. All the numbers appear as anticipated.

    I can’t tell where this quirk originates. Both {all_fields} and {all_non_empty_fields} have similar, if not identical, code in “helper-fields.php”. I imagine the issue could be arising in the “forminator_custom_form_after_render_value” filter in “front-user-registration.php”, but I’m not familiar with that area of Forminator’s code. Otherwise, maybe it’s being affected by the jquery code? But I feel like that’s only affecting the front end, not the back end.

    I’d love to know if this is functioning as anticipated or if there’s a temporary fix before the next update.

    Thanks.

    • This topic was modified 3 years, 1 month ago by greenrooster.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @greenrooster !

    I trust you’re doing well today!

    Firstly, we appreciate the effort you’ve put into debugging the issue and the great description here!

    I was able to reproduce the same behaviour on my test site and it is almost exactly as you’ve mentioned, with one exception – for me {all_non_empty_fields} does respect the number of decimals in two cases: no decimals and two (probably because that’s the only other case here), so it did this:

    – 0 decimals: 123 (correct)
    – 2 decimals: 123.45 (correct)
    – 4 decimals: 123.46 (incorrect)

    I’ve already filed a bug report with our Forminator team about this. I’m not sure whether we’ll be able to provide a quick fix in this case, but I’ve asked about that as well and we’ll update you here and share the code if possible as soon as either me or my teammates hears back from the team.

    Kind regards,
    Pawel

    Thread Starter greenrooster

    (@greenrooster)

    Amazing. Thanks, @wpmudev-support9. It seems to have appeared around the 1.15.0.1 release for us. I went back to check our email logs for form submissions and it seems to line up with the release of that version. I’m only just now recognizing it.

    Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @greenrooster,

    Thank you for the update, I have passed this information to the Forminator team. An update with a fix for this will be rolled out as soon as possible.

    Kind Regards,
    Nebu John

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @greenrooster

    I hope you are doing well.

    I checked the status of this issue and found the planned release is Forminator 1.15.11, which is one of the upcoming updates, you can follow the roadmap on https://wpmudev.com/roadmap/#forminator, the current version under development is 1.15.10 as soon we release this the 1.15.11 will be updated to roadmap page.

    For now, I am marking this as resolved, please keep eye on the plugin update.

    Best Regards
    Patrick Freitas

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Form Submission Email Bug’ is closed to new replies.