• Resolved elieelia9

    (@elieelia9)


    Hello,

    I’m having an issue regarding the results of a form submission. I have setup the following attributes for a radio button of my forms: https://ibb.co/q5XV6Np

    The users currently see the words “Not at all”, “Several days”, “More than half the days”, “Nearly every day” as their options for the radio buttons. Upon submission, I want the values I’ve attributed to these words: 0,1,2,3 respectively to appear. This is working for the numbers 1,2,3 but not for “Not at all” which should appear as 0. Please see the following screenshot: https://ibb.co/6vxYGp3

    This issue persists on any of my forms for which I have assigned it a value of zero to appear on submission instead of the words.

    Any help would be appreciated

    • This topic was modified 6 years, 1 month ago by elieelia9.
    • This topic was modified 6 years, 1 month ago by elieelia9.
    • This topic was modified 6 years, 1 month ago by elieelia9.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hello @elieelia9

    I trust you’re doing well!

    I could replicate the same behavior on our end and have forwarded this to our developers fo additional feedback. We will reply back in this thread once there will be an update.

    Have a good day and take care!

    Kind regards,
    Nastia

    Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hello @elieelia9

    I trust you’re doing well!

    Please try the following hot-fix. Add the following code to a fucntions.php of our child theme:

    add_filter( 'forminator_field_single_markup', function( $html, $id, $required, $options ){
        if( $options ){
            foreach( $options as $option ){
                if( $option['value'] || is_numeric( $option['value'] ) ){
                    $html = str_replace( 'value="' . esc_html( $option['label'] ) . '"', 'value="' . esc_html( $option['value'] ) . '"', $html );
                }
            }
        }
        return $html;
    }, 10, 4 );

    This code can also be added as a mu-plugin. To do so, please create a forminator-field-single-markup.php file, add <?php at the top at the above snippet bellow.

    Upload the file to /wp-content/mu-plugins/ directory. If there is no mu-plugins folder, please feel free to create it.

    Let us know if you have any further questions.

    Kind regards,
    Nastia

    Thread Starter elieelia9

    (@elieelia9)

    Hi @wpmudev-support9 thank you for your reply. I have attempted your fix by adding the code as a mu-plugin as seen by the following screenshots:

    https://ibb.co/sWT3bhF
    https://ibb.co/Fm01CF5

    With this implementation I am still getting the following results on submissions where the label is appearing instead of the number 0. Please let me know if I have followed your steps incorrectly

    Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hello @elieelia9

    I trust you’re doing well!

    Thank you for sharing these screenshots. Please change the folder name inside the wp-content from mu-plugin to mu-plugins.

    After this please see if the snippet is working for you!

    Let us know how it went!

    Kind regards,
    Nastia

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Submission Exports’ is closed to new replies.