Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Basic Goal

I am trying to create a new list form in SharePoint 2010 that contains a field that is bound to the list item's value. For example, what if I want a "phone number" field on my "new list item" form where the field displays the format (xxx)xxx-xxxx? How do I do that? Once the phone number is filled out and the new list item is created, the list itself should show the phone number (preferably with the formatting intact).

Please give me an idea of where to start. I started to create a new one in SharePoint Designer 2010, and I see the tags that seem to represent the controls that are already bound to the new list item. So how do I bind my own control to the new list item? I don't care if this solution uses SharePoint Designer 2010 or Visual Studio 2010. I'm only looking for some idea of where to start... I don't understand how the list form is tied to the list.

I see that SPD 2010 has validation capabilities, but at some point in my project, I will need formatting AND validation.

Thanks for any ideas.

share|improve this question
    
I flagged your question to have it moved to SharePoint StackExchange. Hopefully you'll get more advice there. –  Christophe Feb 1 '12 at 6:08
add comment

migrated from stackoverflow.com Feb 1 '12 at 20:13

This question came from our site for professional and enthusiast programmers.

1 Answer

First, there's an application for building advanced forms for SharePoint, called InfoPath. This might be your best bet, considering your requirements.

Without InfoPath, I would use a standard SharePoint form, and add some JavaScript or jQuery for validation and formatting on the fly. Plugins like jQuery Validate might work for you.

You could use SharePoint Designer to bind fields to a list, but it seems to be too much trouble compared to the above options.

share|improve this answer
    
How can I use SPD to bind fields to a list? Everything I've seen thus far starts out with fields already bound to the list. Additionally, what happens if I want the new list item form to say (xxx)xxx-xxxx but the list to say the full string of numbers xxxxxxxxxx without the formatting. What happens if I also want the list to have the formatting? These are the kind of questions I'm looking for answers to. That being said, JQuery doesn't seem like a bad idea, nor do your other suggestions. –  KyleM Jan 31 '12 at 0:22
    
That's what you should do, use a field already bound to the list. If not, you'll need to write your own code to write back to the list, using Web services for example. –  Christophe Jan 31 '12 at 0:54
    
Unfortunately, in a forum it is hard to answer such open questions. All of what you want is possible. If you need flexibility, client side code (JavaScript/jQuery) is your best bet. It will allow you to disconnect the data from the rendering. –  Christophe Jan 31 '12 at 0:57
    
Yes but that doesn't answer my original question. I want to use List forms because that is the standard SharePoint\ way of customizing the interface that allows the user to create, read, or update list items. even if you can point me in the right direction that would be helpful... –  KyleM Feb 1 '12 at 1:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.