3

I am running a pair of sites using MSM and although I have a separate registration form for each site (i.e. different template, different URL), there is no way of actually linking a newly registered user to the site they registered for - as all new users end up in the same "Pending" list, regardless of which form they filled in.

This is one of the strange features of MSM, where some membership features are site-specific and others are not.

So, I want to create a required custom profile field that will force users to specify which of the two sites they want to join.

The simplest way to do this, it seemed to me, without forcing the user to write out the site name by hand, is to have a drop-down select menu:

Label: Which site? placeholder: [select a site] option1: site1 option2: site2

Unfortunately there seems to be no way to make select-type profile fields "required" as the system never perceives them as empty - even if I leave the placeholder position empty.

Can anyone suggest a way around this problem?

Or suggest an alternative way of linking new registrations to the site they have registered for?

(I know that I could have them placed automatically into a site-specific member group, but then you lose the ability to activate multiple users while sending an activation email - which you get when using the "Pending" list; something my client wants to keep).

Many thanks

Chris

1

Make it a hidden submit field, on each registration form, so that way the user doesn't have to complete it at all.

<input type="hidden" value="site1" name="site_name" />

Where {site_name} would match whatever field you decided to use.

For example, if you were using ExpressionEngine's built-in registration process or say Solspace's User that allows you to more readily customize those forms, then the actually field might be…

<input type="hidden" name="m_field_id_5" value="Site 1" class="input" maxlength="100" size="40" style="width:100%;" />

or

<input type="text" name="m_field_id_5" value="Site 1" class="input" maxlength="100" size="40" style="width:100%;" />

The first makes it a hidden field, the second, just a regular input field with a pre-filled value. The hidden field is better, since you don't need the user to modify the data.

But assuming you aren't placing members into channel data, like Profile:Edit, Zoo Visitor, and Safecraker Registration allow, then you'll need to look up the actual name of the member field. Despite their labels of say 'Organization' or 'Site Name', they generally have field names such as m_field_id_5, m_field_id_6 etc.

| improve this answer | |
  • Thanks for your suggestion. I tried that but the value was not written into the field when the form was submitted. – agregat Jan 13 '13 at 16:32
  • 1
    You didn't use it as is, did you? It needs to be modified for whatever registration form/system you are using. You didn't mention if you were using User, Zoo Visitor, SafeCracker Registration, Profile:Edit, standard EE or something else. So I just provided a generic example. I've updated the response, so if you were using the internal EE registration. – nonprofit_tech Jan 13 '13 at 17:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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