• Resolved ADeweyan

    (@adeweyan)


    We’ve been using the Smart Forms plugin for years and are very pleased with it. Thanks.

    One feature we’d like to see is some way to group fields — either form groups or just html sections of some kind.

    We have a form for customers to select brochures. Each one has a thumbnail, a form control to select quantity, and a download link. Right now, all the thumbnails are in one row, each one and HTML field taking 3 columns. Then there is a spacer row, then all of the selection boxes are in one row, each taking 3 columns and so on. This works fine until we go to a narrow window — then all of the thumbnails are stacked, below that are all the form controls, and so on.

    It would be ideal to have a form-group or other markup so that we could put the different form elements (two HTML boxes and one selection field in this case) into a group that could be given a column width that would be applied to all of the contained fields.

    I can imagine it would get complicated to create something structural like that — so maybe all we need is something that doesn’t normally display (like form group) and that doesn’t need to accept a column width, and then we can customize it using CSS. On the code side it could be very simple (just an open tag at the top and a close tag at the bottom), but I can imagine it would be complicated from the admin interface side of things.

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

    (@edgarrojas)

    Hello!

    Thanks for your feedback =). You are right, it is very difficult to do something like that. I still have plans to do it though since another frequent request is to create a ‘repeater’ field (a field that can repeat other fields when the user click a button), which would also need a container. In the meantime though, i think you could easily do this with javascript, in the javascript tab you can add javascript that is executed after the form is loaded.

    For example, the javascript bellow would wrap two fields in a div and would set the background color to red, is that kind of what you need?

    //AUTO GENERATED CODE, DO NOT DELETE
    (function(){var javaObject={

    //YOU CAN PUT YOUR CODE BELLOW

    //jQueryFormReference:A jquery reference of the loaded form
    AfterFormLoaded:function(jQueryFormReference){
    rnJQuery(‘#rnField1,#rnField2’).wrapAll(‘<div class=”mycustomWrap”></div>’);
    rnJQuery(‘.mycustomWrap’).css(‘background-color’,’red’).css(‘float’,’left’);

    },

    //jQueryFormReference:A jquery reference of the loaded form
    //formData:An object with the information that is going to be submitted
    BeforeFormSubmit:function(formData,jQueryFormReference){
    //Here you can put code that you want to be executed before the form is submitted
    }

    //MORE AUTO GENERATED CODE, DO NOT DELETE
    }; return javaObject;})

Viewing 1 replies (of 1 total)
  • The topic ‘Feature Request: Structural/grouping Tags’ is closed to new replies.