views:

16

answers:

2

I have modified the NewForm.aspx page for a SharePoint list, and am changing the visibility of certain div's based on the value of radio input buttons. I'd like these values to be passed to a list field as well. I have a couple of questions regarding this:

1) How can I pass the Yes/No value from the radio input to a SharePoint list field? 2) Can I drop a Yes/No field from the list on the form and use that to control the visibility of my div's?

Thanks.

A: 

Since you're already using JavaScript, on your NewForm.aspx you could probably use SPUtility.js; full disclosure, this is an open source library I maintain.

Both of the options you mention are possible. I haven't added support for Yes/No fields (as of v0.3) but you could probably do something like this.

  1. Create a single line of text field (will hold your value in the list). Lets call it "Text Field".
  2. Based on our radio button input, call SPUtility to set the field's value: SPUtility.GetSPField('Text Field').SetValue('Hello world!');

You could also probably hide "Text Field" so they can't see the value change.

Or... if you wanted to go with option #2, you could help me add support for Yes/No fields. :)

Hopefully this helps.

Kit Menke
A: 

You can use our Smart List Pro product to modify your list form. We have various capabilities, such as showing/hiding fields depending on values of other fields and user identity, tabbed interface and much much more.

Vladi Gubler