Sharepoint form fields validation

I have a sharepoint list with below fields.

Name: (Input text Field) Area: (Choice Field) - Drop-down type Pin code: (Input text Field)

All the above fields should not empty while saving the form.

I want to use multiple IF conditions in the PreSaveAction, if any conditions failed ,it should return false.

    If statement1 {
    conditions1
    return true; 
//if failed return false;
    }
    else if statement2 {
    conditions2
    return true;
//if failed return false;
    }
    else if statement3{
    conditions
    return true;
//if failed return false;
    }
    else
    {
    return false;
    }

Upvotes: 0

Views: 346

Answers (1)

Yannic Hamann
Yannic Hamann

Reputation: 5215

Are you asking for the technique how to validate fields in a SharePoint form?

There are several options and I would consider to use JSLink for that.

Or are you struggling to write valid JavaScript code? Then take a look here.

Upvotes: 1

Related Questions