locked
Is it possible to change attributes to a content type RRS feed

  • Question

  • So they asked me to change the Phone field on a page to validate as required information.  One would figure that to be a simple setting change on a control.  Not so.  Underlying the page is an InfoPath form based on a content type, Contact.  Once I get it open in what I guess is InfoPath designer, I look at the properties of Phone and the "cannot be blank" check box is not checkable.  (Why is the control tied to the data element?!)  So I try it on the data element for Phone in the pane to the right.  Same story.  Then I go back to the SharePoint list, drill to the content type and change the Phone field to required.  Are we good?  NO!  Every time it refreshes it reverts to Optional.

    1) Where does one have to go to modify the content type?

    2) Why do we let Microsoft get away with such ridiculousness?  Why can't a form be MORE restrictive than the underlying data structure?

    Thursday, April 26, 2012 3:14 PM

Answers

  • The default "can't be blank" option applies to the underlying data field.  If you want to just have a cosmetic validation without modifying the data, add a new rule to the field:

    1. New validation rule

    2. Condition: If field is blank

    3. You'll need a string for the warning - "Phone number can't be blank" would work.


    jliu - http://johnliu.net - http://sharepointgurus.net

    • Proposed as answer by ova c Friday, April 27, 2012 9:34 AM
    • Marked as answer by Entan Ming Friday, May 4, 2012 2:57 AM
    Friday, April 27, 2012 2:44 AM

All replies

  • You need to go to Site Settings and then Galleries > Site content Types

    and edit the content type you created from there. actually you need to edit the Site column. You'll also find the site columns in Galleries, the link is just above Site content Types in Site Settings page.


    ceren


    • Edited by ova c Thursday, April 26, 2012 3:22 PM
    Thursday, April 26, 2012 3:21 PM
  • Could it be you were right in the first place?  I can't find Phone under site columns, but do under Site Content Types.
    ****

    no, I can't.

    when I go to [Forms>  Login Credentials Form>  List Settings>  Contact], I see Phone.  But in neither of those other locations do I see it.


    fyi, I'm a CRM guy who has had the greatness of SharePoint thrust upon him.  So I am uncertain of the history, but believe this stuff may have originated on a 2007 farm and moved here.
    • Edited by mardukes Thursday, April 26, 2012 4:14 PM
    Thursday, April 26, 2012 3:44 PM
  • The default "can't be blank" option applies to the underlying data field.  If you want to just have a cosmetic validation without modifying the data, add a new rule to the field:

    1. New validation rule

    2. Condition: If field is blank

    3. You'll need a string for the warning - "Phone number can't be blank" would work.


    jliu - http://johnliu.net - http://sharepointgurus.net

    • Proposed as answer by ova c Friday, April 27, 2012 9:34 AM
    • Marked as answer by Entan Ming Friday, May 4, 2012 2:57 AM
    Friday, April 27, 2012 2:44 AM