Multiple text box array

Feb 21, 2012 at 10:44 PM

Hello.

I have a radio box on my SharePoint EditForm.aspx. When an item is selected I'm going to hide a list of columns and show another group and visa versa.

Instead of definig the variable for say 20 fields then running through each one to either hide or show depending on the radio box selection, does SPServices have a "presto" type of jquery function to throw them into an array at which point I'd say, for example..... peoplefieldsArray unhide etc.?

Thanks

Feb 22, 2012 at 12:47 AM

Carl,
I do not know of an automated way in SPServices to do that. What you are describing is something that is too specific and custom. SPServices is meant for interacting with SP's web services API.

What you are asking for can be done with a little JavaScript. One approach is to use CSS classes. Example: place a class named group1 on all columns for the first group of columns you want to show hide. Place group2 on the columns for the second group. The classes need be placed on each row of the on the table , including the table headers. You might have to customize the edit form (ex: through SP Designer) to include the classes as it builds the table)

To hide and show, you can do something like:
$(".group1").hide("slow", function(){ $("group2").show("slow"); })

Paul

Sent from mobile

On Feb 21, 2012 6:45 PM, "Carlw" <notifications@codeplex.com> wrote:

Feb 22, 2012 at 12:36 PM

Thanks for the feedback Paul, much appreciated. Ok that makes perfect sense! I also like the inclusion of the slow/fast function, great idea.

Cheers

Carl

From: ptavares [email removed]
Sent: Tuesday, February 21, 2012 8:47 PM
To: Williams,Carl [Ontario]
Subject: Re: Multiple text box array [SPServices:338567]

From: ptavares

Carl,
I do not know of an automated way in SPServices to do that. What you are describing is something that is too specific and custom. SPServices is meant for interacting with SP's web services API.

What you are asking for can be done with a little JavaScript. One approach is to use CSS classes. Example: place a class named group1 on all columns for the first group of columns you want to show hide. Place group2 on the columns for the second group. The classes need be placed on each row of the on the table , including the table headers. You might have to customize the edit form (ex: through SP Designer) to include the classes as it builds the table)

To hide and show, you can do something like:
$(".group1").hide("slow", function(){ $("group2").show("slow"); })

Paul

Sent from mobile

On Feb 21, 2012 6:45 PM, "Carlw" <notifications@codeplex.com> wrote: