Calculator ignoring attributes from shortcode

Hello @zxpw

Could you please indicate the URL to the page that contains the form to check the issue in detail?

Best regards.

Thread Starter
zxpw

(@zxpw)

Hello @zxpw

My apologies. Yes, the module that manages the additional shortcode attributes changed. Previous plugin versions generated global Javascript variables with additional shortcode attributes, but it has a problem. It overwrites other global variables that can be used by third-party plugins or the theme active on your website.

The latest plugin versions generate the cff_var object, whose properties are the additional shortcode attributes.

So, the code to use the shortcode attributes from the equations needs to be edited as follows:

(function(){
if('cff_var' in window && 'first_attr' in cff_var) getField(fieldname1|n).setVal(cff_var.first_attr);

if('cff_var' in window && 'second_attr' in cff_var) getField(fieldname2|n).setVal(cff_var.second_attr);

if('cff_var' in window && 'third_attr' in cff_var)  getField(fieldname3|n).setVal(cff_var.third_attr);
})()

Best regards.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer