Dynamic Forms On Load

rss

Posted by lucidica - May 13 ’13 at 02:53

I have just been testing with dynamic forms, particularly the 'hide tabs' feature as mentioned in this article

http://formsdesigner.blogspot.co.uk/2013/03/how-to-create-dynamic-forms-with-forms.html

 

The tabs only seem to hide though when the field is changed, how would you get it to hide the tab 'onload' and only show it when the field was changed?

 

  • Dmitry
    Dmitry
    Admin
    Member for: 9 years 5 months 21 days
    #1 by Dmitry May 14 ’13 at 01:06

    In the example above we call 'setResolutionTab' function that shows/hides tab based on Status field value twice: when Status changes and when page is loaded:

    // Subscribe on status change
    fd.field('Status').control().change(function () {
    setResolutionTab();
    });
    
    // Initialize
    setResolutionTab();
    

    So, if you wish to hide tab 'onload' without checking the current field value, just call:

    $('#fd_tabcontrol-0').tabs('option', 'disabled', [1]);
    

    instead of the second call of setResolutionTab after 'Initialize' comment.

  • lucidica
    Member
    Member for: 8 years 6 months 18 days
    #2 by lucidica May 15 ’13 at 04:17

    the function 'setResolutionTab' works fine on the edit form and the new form but not on the display form

     

    If I put in the line you suggested this works fine on the display form (though obviously it disables the tab in all instances)

     

    From what I can see the setResolutionTab function is not being called on load? Maybe I am missing something?

     

     

  • Dmitry
    Dmitry
    Admin
    Member for: 9 years 5 months 21 days
    #3 by Dmitry May 15 ’13 at 12:27

    [#2]: setResoultionTab doesn't work on the display form because it's impossible to get Status field value and compare it with specific values. To make different display forms you don't have to use javascript. Use javascript only if you wish to make the form dynamic, change it while user edits fields. If you wish to design a specific form for specific field values and these values will not be changed on this form you have to use groups:
    http://spform.com/documentation/groups

    With help of groups you can design completely different forms with their specific fields and tabs for the same list and show them in accordance with rules. Rules are built on current field values, current user or date. For display form you have to use rules because values on display form cannot be changed. Please, see our video:
    http://www.youtube.com/watch?v=bI7TFO_bN6c&hd=1

  • 3advokattilbud
    Member
    Member for: 7 months 15 days
    #4 by 3advokattilbud May 22 ’21 at 06:04

    With our smart insurance quote service we will promise to dust off up to 3 completed insurance quotes from cheap competing insurance companies in your region. Are you considering getting a vacation home insurance assignment done? At 3forsikringstilbud.dk you will easily find 3 solid offers. Mika Holbeck, Hillerød: Our household immediately received 3 solid offers and used for a task concerning moped insurance in Hillerød. I got the finest help, and even at a really sharp price.

    Do you have problems getting in touch with a dedicated and willing insurance company near you? Gratisforsikringstilbud.dk works in the way that you enter your insurance assignment, whereupon the companies compete to come up with the most beautiful price offers. Persistent insurance companies of course offer to provide assistance everywhere, for example in the Zealand region.

    You can order free 3 insurance offers no matter where, for example, in the region of Southern Denmark you are. At 3forsikringstilbud.dk we find year after year lots of formidable offers all over the country. Most quotes submitted include a fixed price discount that is to your advantage.

    All local specialists are proud of their craftsmanship and the key words are i.a. craftsmanship and ultra matter-of-fact customer feedback. It is surprisingly easy to compare offers for dedicated insurance work from home and earn a price reduction of several DKK 1,000. Insurance consultant Boris Villberg supports the recommendation that as far as possible you obtain at least 3 offers when you take out new insurance.

    An amazingly easy and super well-established insurance benefit at prices that you will love. Karlo Bendixen, Kolding: Our household immediately received three profitable offers and hired for a task regarding car insurance in Kolding. excellent service - quick agreement - superb work. Often you do not have the skills to solve your problem yourself - so get three great deals.

    In just 8½ minutes you can fill in the assignment in the insurance form and submit it for further processing. Professionals in Kolding handle the difficult insurance tasks at relatively useful prices. With many years of industry knowledge, we can match specialists with your task.

Displaying 1 to 4 of 4 messages