• Resolved samster11

    (@samster11)


    Hello,

    I used to be able to add an html so that I can dynamically change parameters in the shortcode. e.g.

    [CP_CALCULATED_FIELDS id=”11″ price=”1200000”] by adding this html but it looks like it stopped working once I updated the site / plugins. What could be the issue?

    <script>

    fbuilderjQuery(document).one('showHideDepEvent', function(){

    fbuilderjQuery('[id*="fieldname1_"]').val(price).change();

    });

    </script>

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @samster11

    I assume you have been using an outdated version of the CFF. Some time ago, we modified the module that manages the global variables generated from the additional form shortcode attributes, and the shortcodes for variables.

    In earlier plugin versions, it created global variables using the variable names. However, this led to issues. If you input an internal browser variable such as window, document, location, or similar, it could overwrite the variable and impact the website.

    In the latest plugin updates, it generates the cff_var object as a global variable, and the shortcode attributes are converted into properties of the cff_var object.

    So, your code must be edited as follows:

    <script>
    fbuilderjQuery(document).one('showHideDepEvent', function(){
    fbuilderjQuery('[id*="fieldname1_"]').val(cff_var['price']).change();
    });
    </script>

    Best regards.

Viewing 1 replies (of 1 total)

The topic ‘Shortcode inputs not working’ is closed to new replies.