0

I could really use some guidance with an OG related task. I'm needing to modify a form used to add existing users to organic groups. The path is "/group/node/1/admin/people/add-user". I need to remove the user search box and instead implement a couple of name searches: "Firstname, Lastname", and "Lastname, Firstname". Not sure what I should be modifying via a hook_form_alter, or other hook. Any thoughts?

Attached is a before and after view of the form. I appreciate any guidance anyone can provide.

Thanks!

Before and After design of form

1
  • Alternatively, I think just adding the first and lastname to the username search box should suffice
    – Jav
    Jul 10, 2013 at 20:03

1 Answer 1

0

I ended up using a custom callback to populate a new field called "full_name", and then used JQuery to populate the username field on blur of my new field, and also hid the username field to make the interface a little more intuitive. It worked well enough, but it would be nice to completely override the submit function and use a custom one to ensure everything worked as expected. If a user enters in an invalid name and clicks enter, the default validation fires off, and nothing I've created works without a page reload. Kind of stinks, but at least it's working for the time being.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.