Posted by patalano on December 17, 2012 at 7:00pm
Start:
2013-01-03 02:00 - 2013-01-04 04:00 America/New_York Organizers:
Event type:
Sprint
Postponed
Since no-one indicated they were planning to attend this event, we've postponed it until the next scheduled UDU meeting on January 2.
Webforms prepopulated with user (shibboleth) data
- When: Thursday 12/20/12
- Time: 2:00 pm to 4:00 pm
- Where: ISB145
- Who: Joanne Patalano and you (I hope)
- Need four to run this workshop.
- Sign-up by Wednesday 12/19/12 Noon.
- Be prepared to demo or talk about your work with forms - optional but encouraged.
Workshop Jist
In D6 I installed a signup module that allows users to signup online for a workshop. (see umass.edu/wld and log in.) After log in, your signup form is prepopulated with your LDAP data (name, email and employee ID). I've figured out how to prepopulate webform fields in D7 with shibboleth user variable data. I'd like to demo what I've learned and want your expertise and input.
Workshop Details
- Demo D6 and Signup Form that prepopulates form fields with LDAP data - Joanne
- Demo D7 and Webform that prepopulates with Shibb vars using supertokens - Joanne
- What you need to follow along: A D7 site on OIT's server and the webform module
- Demo your work with forms
Call Outs
- To Dan Harper: Dan are you available to join us to demo the work you've been up to?
- Gary Parker: Would you be able to talk Shibboleth with us?
Comments
Sorry I cannot
Sorry I cannot attend.
Meanwhile, after our last meeting I considered a way to simplify and generalize the problem. In other words: "How to access server environment variables in a Drupal way?"
It occurred to me that it would be appropriate to write a module to turn some of the variables that you could get at via PHP as Drupal tokens. Then as tokens, they would be accessible via Rules, Webform, and several other methods.
server env vars
Hi Dave,
Sorry you can't make it. It would be great if you were a part of this discussion.
In the meantime, I've used the server vars with supertokens in the default value of webform fields. So the default value %server[HTTP_GIVENNAME] will prepopulate the field with my first name. There's a list of server vars under /user > shortcuts when debugging is enabled in the shibb settings.
Ah, I forgot that Webform
Ah, I forgot that Webform explicitly did this.
Here's their help text under tokens when you edit a field in Webform:
"In addition to %get and %post, the following super tokens may be used, though only with logged-in users: %server, %cookie, and %request. For example %server[HTTP_USER_AGENT] or %session[id]."
My other suggestion above for implementing new tokens as a separate module would work more generally beyond the Webform module.
see what you mean - I also used ...
I see what you mean. I saw that help text. On my journey to figure shibb vars out with forms, I also used (successfully) this in a custom form module: '#default_value'=>$_SERVER['givenName'] and it works.
One thing led to another and saw that supertoken, %server. Great stuff.
Will look forward to what you accomplish - maybe you can do a sprint - BOF - or something like that.
I actually wrote the Token
I actually wrote the Token module that I described. It's pretty short. I can share it elsewhere on our user group site or at a meeting.
Google Hangout
I just had a quick chat with Steve Brewer about running this event as a Google Hangout so I can join from my home office. The plan is for Steve to run the hangout from the presenter's workstation, share the whole screen, and invite me. If there are other folks out there that would like to participate in this way, let us know. -Tom Hoogendyk
I will be a little late
I have a 1:30 meeting prior to this event but I'll try to get over as quickly as possible. I expect I'll be in around 2:30.
If there's time, I can show the module I've been working on...
It uses shibboleth, server variables, and the forms api to collect some very basic student data. Interested to see what other people are doing as well!
your module
Yes, plan on showing it. That would be great. I will probably take up 30 or so minutes.
Postponed
Note that I have edited the post to reflect that Joanne and I decided to postpone her presentation until the next regular UDU meeting. Only two people had signed up -- and one of them wasn't actually going to be able to attend and was hoping to skype in. :-/
Happy holidays everyone!