• Resolved v29neil

    (@v29neil)


    Hi,
    I am developer of wordpress plugin. I want to point out one bad practice(maybe) in your code.
    In this file https://app.hatchbuck.com/OnlineForm/js/cdn/jotform.js?ver=1.2.2
    You are extending the native objects and modifying the behavior of Array class.
    Further refrence –
    https://stackoverflow.com/questions/14034180/why-is-extending-native-objects-a-bad-practice

    So whenever other developer try to do this-

    var myArray = [];
    console.log(myArray);    // it should print empty array but it is not . It is printing the properties which were added by extending the object. 

    So it is really messing our plugin code.
    For example –
    if i try to loop inside array

    for(var i in myArray){
    console.log(i);   //it is giving unwanted properties along with its own properties. 
    }

    If you have any way to avoid it . Do recommend us

    • This topic was modified 8 years ago by v29neil.
Viewing 1 replies (of 1 total)
  • Plugin Contributor Viktor Nagornyy

    (@viktorix)

    Thanks for bringing this to our attention. However, this is an issue that should be brought up with JotForm.

    Hatchbuck uses JotForm for their form builder, and jotform.js is what it generates.

    This is not an official Hatchbuck plugin. We’ve only used what Hatchbuck provides when it creates forms to allow easier embedding. Based on my experience with these forms, you can remove that file without breaking the form. It is only used for form field validation. It doesn’t affect form submissions.

Viewing 1 replies (of 1 total)
  • The topic ‘Third party plugin issue due to hatchbuck plugin’ is closed to new replies.