I have attached a screen shot of the registration form that I am working on. There are several things I need help with.
1. I can't find how to remove the "Add Another Item" and the "Remove" button from the form. I am supposing they are related.
2. I want to hide "This registration is for" dropdown menu assuming that the default selection of "other person" will be what remains as the selection for all registrations. I want to do this because this registration form is only for multiple and single children registrants that are being signed up by parents.
3. Also, I would like to change the language on the drop down menu for some future registrations where I will need this menu showing for selections. Where do I find the place to change the words "other person" to "child"? And what is the selection "other account" used for?
Thank you for your help.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | cck_text.patch | 4.66 KB | rivimey |
| RegisScreenShot2.png | 41.93 KB | Loube |
Comments
Comment #1
queteparece commentedHi Loube,
I'm also looking for the point 2, and in general for how to manipulate the registration form, maybe templates tpl.php?
Could it be possible to do everything by using AJAX and not to redirect the user to another form?
Comment #2
dpiThis is not from Registration.
As an administrator, you will see all 'person types' (myself/other/email). If you do not want your users to use a person type, then do not give them permission to use these person types (see user permissions list).
Or hook_form_FORM_ID_alter
Localise your strings: http://drupal.org/project/l10n_client ?
Perhaps you should change the myself string. Unless each child has an email address (other person).
Comment #3
Loube commentedHi dpi,
Thank you for your answers. I am in a bit of a muddle over getting my registration form to behave right.
When I try to register multiple students as an anon user I have a select box with no options. I get the message:
"This registration is for: field is required."
So I enable the permission "Register other people" for anon users. Then I get one selection available "myself". Which is odd. So I go with that and select it for both of my registrants and then I get the message. "Email addresses must be unique for each registrant."
First, how do I get "other people" to show up for anon users?
Second, if a user is anonymous they should only have that selection anyway, right?
Third, if that is true, having the select menu with one option is confusing and strange for the anon user. Can I make "other people" be the default selection and have the menu not show at all for anon users?
I would appreciate any help. Thank you.
Comment #4
dpiThat may be a bug.
Myself = Other person when the current user is Anonymous.
You can only use one email per host entity. (Event)
I'm not sure it makes sense to omit the form element when there is only one option. Its good to be explicit about who the registration belongs to. Whether it should be in a select element, or plain markup etc, is debatable.
Comment #5
Loube commentedI see. I think for now I will just have the registering parents sign up as auth users before they can register their children for the summer programs.
Thank you for your help.
Comment #6
rivimeyHi,
I am trying to configure registrations for a very similar purpose: (largely) anon registrations with children as the actual countable items.
I have, for the moment, locally modified my registration.forms.inc file such that in registration_form it reads:
which seems to work: it should? be equally possible to add some code derived from
that would hide the who_is_registering field entirely if there is only one item in the $who_options array.
Note I have added a #description entry, which I felt was necessary in this instance. Back to the previous point about emails having to be unique, I think modification of "The email to associate with this registration." to indicate this might be helpful.
The above code seems unsure about what to use for isset(), because I am. Both were taken from code elsewhere in this file.
--
To answer the "Add Another Item": it is coming from the Field code because a field you're using has its "number of values" set to "Unlimited". Change that and it will go away.
[In my case, I want it, but don't want the draggable associated with it, because it might confuse and there's no benefit in ordering; but that is another story.]
I added some other code that used hook_form_alter to change the "Add another Item" to read "Add another child"; such code would equally able to change other text, though from my previous experience, it would be tedious.
Comment #7
dpiI don't think there is anything actionable here.
Comment #8
rivimeyHi dpi,
Not sure why you say #7
There was a clear request to hide the Registration For select item when there was just one item, and I included code that got close to this by setting a default value. I would also very much prefer appropriate #description field.
Is it that you need an actual .patch for it?
Ruth
Comment #9
rivimeyComment #10
Loube commentedHi rivemey,
Thank you for your response. Regarding your help with Add Another Item:
"To answer the "Add Another Item": it is coming from the Field code because a field you're using has its "number of values" set to "Unlimited". Change that and it will go away."
I found that the registration form would not let me change the number from unlimited to one. I found the problem to be related to the Field Collection that I used for the registration. I had to go back into each of the fields in the embedded field collection and un-check required. Once I unchecked all of those I was able to change the value on the registration form from unlimited to one. Then I was able to go back and check the field collection items to be required.
Comment #11
dpiThis is for patch review.
Comment #12
levelos commentedIt is not clear to me what, if anything the issue here is. Going to close and feel free to reopen or post more specific tickets.
Comment #13
dtesch commented"I added some other code that used hook_form_alter to change the "Add another Item" to read "Add another child"
Hi rivimey,
Would you please share the hook_form_alter code you mentioned above and where you included it to make it work. I'm trying to do the same thing and not having much success.
Comment #14
rivimeydtesch, sorry I didn't reply earlier.
The code I used is based on Ken Hawkin's sandbox project at http://drupal.org/sandbox/khawkins98/1266386 which is in turn based on other work. I have attached a patch against ken's current git source.
Ruth
Comment #15
dtesch commentedThanks for this!