Tab Color and Required Fields

rss

Posted by Sonoma - Oct 16 ’14 at 02:36

We have some users that usually forget to fill in a field or two or more. We are using tabs. Everything works good but for somereason when they forget a field they do not know what they missed.

I have played around with the tabs some with colors and next/prev, ect.

Is it possible to if someone misses a required field to have the tab the field is locate on turn red?

 

 

Thank you.

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 5 years 10 months 26 days
    #1 by Dmitry Kozlov Oct 20 ’14 at 05:18

    Hi,

    I'd recommend to add custom validation to your form with help of Forms Designer's JS-framework and check whether all the required fields are filled-in. Here is a sample:

    fd.onsubmit(function() {
    	if (!fd.field('Field1').value()) {
    		// activating a second tab:
    		$('#fd_tabcontrol-0').tabs('option', 'active', 1);
    		
    		alert('Please, fill-in the Field 1');
    		return false;
    	}
    
    	return true;
    });
    
  • Sonoma
    Member
    Member for: 4 years 10 months 22 days
    #2 by Sonoma Oct 20 ’14 at 09:31

    Works great. Thank you.

    Seeing how this works there really is not a reason to change the color tab.

Displaying 1 to 2 of 2 messages