• It seems that 2.x versions does not control array inputs like:

    <input name="widgets[aaa][xxx][key][]"...
    <input name="widgets[aaa][xxx][key][]"...
    <input name="widgets[aaa][xxx][key][]"...
    <input name="widgets[aaa][xxx][key][]"...

    e.g. All widgets with array checkbox input options would not work properly.

    Maybe we can fix this with getFormValues method from siteorigin-panels.js

    https://www.ads-software.com/plugins/siteorigin-panels/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Greg Priday

    (@gpriday)

    Hi 082net

    I’m fairly sure that Page Builder should be handling these types of form name values, but I’ve logged this as an issue so we can investigate some more.

    Do you have a specific widget that you’re using? This will making testing a little easier.

    Thread Starter Cheon, YoungMin

    (@082net)

    I’m using Flexible Posts Widget plugin. It has another issue with SiteOrigin Builder on ‘hooks’, but still you may debug passed form-values.

    BTW, I’ve made a simple patch for this issue with help of $.deparam method from jQuery BBQ Plugin.

    /*
     * jQuery BBQ: Back Button & Query Library - v1.3pre - 8/26/2010
     * https://benalman.com/projects/jquery-bbq-plugin/
     *
     * Copyright (c) 2010 "Cowboy" Ben Alman
     * Dual licensed under the MIT and GPL licenses.
     * https://benalman.com/about/license/
     */
     // borrowed only $.deparam method
    (function($){$.deparam=m=function(L,I){var t=decodeURIComponent,K={},J={"true":!0,"false":!1,"null":null};$.each(L.replace(/\+/g," ").split("&"),function(O,T){var N=T.split("="),S=t(N[0]),M,R=K,P=0,U=S.split("]["),Q=U.length-1;if(/\[/.test(U[0])&&/\]$/.test(U[Q])){U[Q]=U[Q].replace(/\]$/,"");U=U.shift().split("[").concat(U);Q=U.length-1}else{Q=0}if(N.length===2){M=t(N[1]);if(I){M=M&&!isNaN(M)?+M:M==="undefined"?h:J[M]!==h?J[M]:M}if(Q){for(;P<=Q;P++){S=U[P]===""?R.length:U[P];R=R[S]=P<Q?R[S]||(U[P+1]&&isNaN(U[P+1])?{}:[]):M}}else{if($.isArray(K[S])){K[S].push(M)}else{if(K[S]!==h){K[S]=[K[S],M]}else{K[S]=M}}}}else{if(S){K[S]=I?h:""}}});return K};})(jQuery);
    ......
    ......
    
            getFormValues: function(formSelector){
                if(typeof formSelector === 'undefined') {
                    formSelector = '.so-content';
                }
    
                var $f = this.$(formSelector);
    
                $f.wrap('<form></form>');
                // var data = $f.parent().serialize();
                var data = $.deparam( $f.parent().serialize() );
    
                return data;
            },
    ......
    ......
    Plugin Support Andrew Misplon

    (@misplon)

    Thanks, @082net, much appreciated. I’ll log this on our bug tracker for Greg to attend to.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Array type inputs’ is closed to new replies.