Jump to content
  • 0

Making one of two fields required



Hi there!

I've created a web form for people to add documents to a document library. The user has the option of adding the document by either uploading a file, or inputting a link. I'm looking for a way to make it so that doing one of those things is required. If they don't have a link, they have to upload a file, and vice versa.

I don't want them to be able to click submit until one of those fields is completed.

Any ideas?



Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello, Laurie.

Because of the browser's security reasons, the content of FILE-field cannot be 'red' in browser.

This is the reason, for example, why the file fields are not filled every time you submit the DataPage.

Imagine the situation: you’ve uploaded a file, clicked to submit, but it was unsuccessful (date field incorrect, CAPTCHA not correct or so on). Usually you see the red label saying: “You did not enter valid information in one or more of the fields.â€.

FILE is lost, because it cannot be stored in browser. And when you then submit the DataPage again (corrected the error, of course), the FILE field will be empty. You need click the “Browse†button again and select the FILE in order to have it setup.

So, the only way to prevent user submitting without file is to set "required" option for it.

May be, the Caspio can provide a custom solution for you. Contact their support.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...