Re: Lots of SharePoint stuff
From: Jeff Webb (jwebb5_at_cfl.rr.com)
Date: 11/30/04
- Next message: Willem-Jan Spoel: "Re: Object model Programming"
- Previous message: ryanh: "Re: Why can't other users see personal views of lists?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 30 Nov 2004 11:38:30 -0500
Hey Bil,
There are a number of ways to do what you want. I'm not sure this is the
best one, but here's a suggestion at least:
1. Create two columns in your look up table, one for provinces and one for
states.
2. In your data list, create two lookup fields bound to those columns.
3. Use FrontPage to open the data list and make US and Can copys of
NewForm.aspx.
4. Open the US and Can pages in FrontPage 2003, right-click the list form
web part, and choose Customize SharePoint List Form from the Edit menu.
FrontPage switches the web part into edit mode. You can then remove US
fields from the Can from and vice versa.
5. Use Frontpage to add an HTML page the redirects the users as appropriate.
Something like:
<script>
if (window.navigator.userLanguage == "en-us")
window.navigate ("NewUs.aspx");
else
window.navigate ("NewCan.aspx");
</script>
You can also use step 4 above to add HTML controls, control visibility, etc.
Be sure you list design is final before you do this because afterward
SharePoint won't maintain the web part and it's a pain to add new fields.
For a summary/detail type of NewForm.aspx, use FrontPage to add a new List
Form web part to the page and bind that control to the Vendors list.
You can do some pretty tricky things with SharePoint through FrontPage, but
be sure to keep back-up copies of the original SharePoint-generated pages in
case you break stuff.
Finally, you could code all of this stuff onto one page and use a script to
control visibility of web parts through an option button or other controls
if you like. I think you'd need to enclose the web parts in <span> tags or
something. I couldn't quite figure out how to control their visibilty
directly from scripts.
Once you start cutting/pasting web parts, I'm sure you'll come up with a
better solution.
Good luck,
Jeff
"Bil Simser [MVP]" <bsimser@shaw.ca> wrote in message
news:%23W$lEzV1EHA.2192@TK2MSFTNGP14.phx.gbl...
> Okay, I'm kinda pushing the boundaries of normal SharePoint customization
> here but need to ask a few questions. Hopefully someone out there can
> provide me with either an answer or at least a direction to look on how to
> do something.
>
> 1. I want to hide/show fields in EditForm.aspx dynamically based on a
> value. Imagine a radio button field with two choices. User selects choice
> 1 and the next 2 fields are available (or visible). User selects choice 2
> and 2 other fields are available. Simple stuff with a little javascript
> but integrating it into the SharePoint edit form is new to me.
>
> 2. Something like #1, I want to parse a lookup list with a filter. Imagine
> again a choice field using radio buttons. One choice is Canada the other
> choice is United States. The next field is a lookup into a list of
> provinces and states. I want to filter the list based on the choice (at
> entry time) so Canadian's don't see States and Americans don't see
> Provinces.
>
> 3. Lastly I would like to do bascially a subform. Maybe my list has values
> for Vendor1, Vendor2, Vendor3, etc. up to 10 vendors. I want the user to
> enter/pick a vendor and add some information and be able to click on a
> "Add Vendor" or something that would create a new row and fill in Vendor2
> information.
>
> Pretty much everything here is a walk in the park with InfoPath. The
> restriction here is I can't rely on the client having Office 2003 so I'm
> looking to do this with editing the EditForm.aspx page (or something). Any
> ideas or thoughts would be appreciated. Thanks!
>
> PS I have a few gmail accounts if anyone comes up with something that I
> can toss out there for incentive.
>
> --
> Bil Simser
> http://weblogs.asp.net
>
>
- Next message: Willem-Jan Spoel: "Re: Object model Programming"
- Previous message: ryanh: "Re: Why can't other users see personal views of lists?"
- Messages sorted by: [ date ] [ thread ]