Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Conditional Form Validation

LEGEND ,
May 02, 2007 May 02, 2007

Copy link to clipboard

Copied

I am using ASP/VB.

I have a list/menu with options that populate via a DB table. For this
example let's keep it simple and use:

<option value="1">Red</option>
<option value="2">Blue</option>
<option value="3">Black</option>
<option value="4">Green</option>

I also have a FileField that lets them select a file to upload.

What I need to do is make the FileField required if they select certain
values (lets say red and black) from the list/menu, and not required for all
other values.I also messed around with passing the value of the list/menu
populating
a hidden textfield on "onchange" but I still can't figure out how to make
the
Filefield required depending on the value of the hidden textfield.

Not sure how to do this, any help would be greatly appreciated.

Thanks!


TOPICS
Server side applications

Views

264
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 02, 2007 May 02, 2007

Copy link to clipboard

Copied

Client side validation on dropdowns is fairly limited, and would be
difficult to implement is the items can change positions in the list. I
suggest that you need to handle this validation server side before the
insert is done.

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"Pizza Good" <pizzagood@myhouse.com> wrote in message
news:f1b1jm$er1$1@forums.macromedia.com...
>I am using ASP/VB.
>
> I have a list/menu with options that populate via a DB table. For this
> example let's keep it simple and use:
>
> <option value="1">Red</option>
> <option value="2">Blue</option>
> <option value="3">Black</option>
> <option value="4">Green</option>
>
> I also have a FileField that lets them select a file to upload.
>
> What I need to do is make the FileField required if they select certain
> values (lets say red and black) from the list/menu, and not required for
> all other values.I also messed around with passing the value of the
> list/menu populating
> a hidden textfield on "onchange" but I still can't figure out how to make
> the
> Filefield required depending on the value of the hidden textfield.
>
> Not sure how to do this, any help would be greatly appreciated.
>
> Thanks!
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 02, 2007 May 02, 2007

Copy link to clipboard

Copied

LATEST
Paul...ok, can you give me some tips on how to do it?

Thanks!



"Paul Whitham AdobeCommunityExpert" <design@valleybiz.net> wrote in message
news:f1b35f$gg7$1@forums.macromedia.com...
> Client side validation on dropdowns is fairly limited, and would be
> difficult to implement is the items can change positions in the list. I
> suggest that you need to handle this validation server side before the
> insert is done.
>
> --
> Paul Whitham
> Certified Dreamweaver MX2004 Professional
> Adobe Community Expert - Dreamweaver
>
> Valleybiz Internet Design
> www.valleybiz.net
>
> "Pizza Good" <pizzagood@myhouse.com> wrote in message
> news:f1b1jm$er1$1@forums.macromedia.com...
>>I am using ASP/VB.
>>
>> I have a list/menu with options that populate via a DB table. For this
>> example let's keep it simple and use:
>>
>> <option value="1">Red</option>
>> <option value="2">Blue</option>
>> <option value="3">Black</option>
>> <option value="4">Green</option>
>>
>> I also have a FileField that lets them select a file to upload.
>>
>> What I need to do is make the FileField required if they select certain
>> values (lets say red and black) from the list/menu, and not required for
>> all other values.I also messed around with passing the value of the
>> list/menu populating
>> a hidden textfield on "onchange" but I still can't figure out how to make
>> the
>> Filefield required depending on the value of the hidden textfield.
>>
>> Not sure how to do this, any help would be greatly appreciated.
>>
>> Thanks!
>>
>
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines