How to create a conditional mandatory field in list?
Hello,
Is there a possibility
in Moss 2007
create conditional
mandatory field in
list?
For example
if I have a list
of coins with the items: Dollar, Euro
and I want
that once the user selects
a Dollar
will be a
mandatory field
and if he chooses to
Euro currency
will have different
required fields.
Thank you
Yuval .C.
December 29th, 2010 1:45pm
Thanks for the
quick
reply,
I'm looking for
another solution.
I want
that once the user to select
roughly one
Dollar then
fields will be
required if he
chooses Euro
then another field
would be required.
Thanks again.
Free Windows Admin Tool Kit Click here and download it now
December 29th, 2010 2:37pm
Hi sadomovalex,
Thanks you very much.
January 3rd, 2011 6:34am
I don't believe you can do this with OOTB SharePoint, unless you used multiple content types, like someone had suggested. However, this is something you could do with an InfoPath form.Planet Technologies ||
SharePoint Task Force
Free Windows Admin Tool Kit Click here and download it now
January 3rd, 2011 5:21pm
Using content types in this way is a difficult option when creating a new item, unless you want the user to choose the currency as the first step in creating a new list item. The reason: the content type field control does not appear on NewForm.aspx; it
is chosen from the New menu on creation of the item.
If that option works for you, then it's the easiest way to implement conditional required (or hidden, for that matter) fields.
Of course, the problem on the implementation side may come from the fact that the content type can be changed on EditForm.asxp. If you don't allow editing, of course, that won't be an issue.
Each of these can also be accomplished using jQuery in a Content Editor Web Part. With jQuery you can add a function to the click or change event of the Coin dropdown that hides/shows columns depending on the Coin selection. Additionally, you can add
validation checking to a PreSaveAction() function in the CEWP, which you can use to cancel the Save commit unless the required fields (based on the Coin selector) are filled in.
Let me know if you would like a more detailed walk-thru of these options.
Blessings,
Jim Bob
January 5th, 2011 9:32am
Check this. It is not the same, but it can help:
http://www.sharepointkings.com/2010/05/required-field-using-jquery-in-newform.html
Hope is helpful!Juan Pablo.
surpoint.blogspot.com
geeks.ms/blogs/jpussacq
@jpussacq
HispaPoint: comunidad sharepoint de habla hispana
Free Windows Admin Tool Kit Click here and download it now
January 5th, 2011 10:06am