Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Set the field value on a Custom list NewForm.aspx

  Asked By: Betsy    Date: Jan 09    Category: Sharepoint    Views: 4531

I have a custom List with a dropdown list field called "Rate" with two
values = Thumbs Up and Thumbs Down.

I have another icon field (picture field).

When the user selects Thumbs Up, I would like to set the image Like.jpg to
the icon field and when the user selects Thumbs Down, I would like to set
the image disLike.jpg to the Icon field.

This is what I'm doing on the NewForm.aspx using SharePoint Designer.

bunch of code.......

if (theType.value=="Thumbs Up")
document.forms("ContentForm").elements("ows:icon:url").value = "http://
document.forms("ContentForm").elements("ows:icon:desc").value = "Thumbs
else if (theType.value=="Thumbs Down")
document.forms("ContentForm").elements("ows:icon:url").value = "http://
document.forms("ContentForm").elements("ows:icon:desc").value = "Thumbs


I'm successfully able to alert 'TU' and 'TD' on NewForm.aspx, but can't set
the image value on saving the form. This code will work in SharePoint 2003
but not working in MOSS.



1 Answer Found

Answer #1    Answered By: Kacey Russo     Answered On: Jan 09

Are you certain those fields are the same names in 2007?

Didn't find what you were looking for? Find more on Set the field value on a Custom list NewForm.aspx Or get search suggestion and latest updates.