www.webdeveloper.com
Results 1 to 6 of 6

Thread: Urgant! Disabling validation form a form, when the form object is hidden!

  1. #1
    Join Date
    May 2014
    Posts
    10

    Urgant! Disabling validation form a form, when the form object is hidden!

    I need to disable the validation requirement on a field, when the field is hidden? Any ideas.

  2. #2
    Join Date
    May 2014
    Posts
    10
    Or I need a working Or statment. Saying one field isnt reguired if the other one is met. So value 1 need to be greater than or equal to 4, or value 2 needs to be greater than or equal to 4

  3. #3
    Join Date
    Mar 2009
    Posts
    495
    What mechanism is used to validate the form to begin with?

  4. #4
    Join Date
    May 2014
    Posts
    10
    fFillerLoadFunctions.push(nfInitDatePicker);

    function nfInitDatePicker() {

    NWF$(".nf-date-picker").datepicker({
    showOn: "button",
    buttonImage: "/_layouts/15/images/calendar.gif",
    buttonImageOnly: true,
    changeMonth: true,
    changeYear: true,
    showOtherMonths: true,
    selectOtherMonths: true,
    showButtonPanel: true,
    dateFormat: "m/d/yy",
    nextText: "Next",
    prevText: "Prev",
    buttonText: "Select a date.",
    currentText: "Today",
    closeText: "Done",
    monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
    monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
    isRTL: false,
    dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
    dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
    dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
    firstDay: 0,
    onSelect: function() {
    var that = NWF$(this);
    this.fireEvent && this.fireEvent('onchange') || that.change();
    if (that.blur) (that.blur());
    },
    beforeShow: function(input, inst) {
    }



    This code is what decides if the panel shows. Its based on a check mark. But what I am thinking that might be better is an if else statement. If button A is check marked then this single request panel shows, and hours requested is required to be over 4. If button be is checked then multiple requests panel appears and multiple hours requested is required to be over 4.

    What is the best way to go about this. I am still very new to code O.o

  5. #5
    Join Date
    May 2014
    Posts
    10
    mm Thats the wrong code. But either way I want to change it.

  6. #6
    Join Date
    May 2014
    Posts
    10
    Quote Originally Posted by c.marie.ward View Post
    mm Thats the wrong code. But either way I want to change it.
    I checked this code. It is working.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles