I have a registration form which allows admins of my site to register new members. The form itself is functioning fine however the member group is always defaulting to Pending (ID:4).
Here's the form:
{exp:user:register admin_register="yes" allowed_groups="5|6|7|8|9" return="members"}
<div class="row profile">
<div class="col-sm-6">
<label for="username">Username</label>
<input type="text" name="username" id="username">
<label for="email">Email</label>
<input type="email" name="email" id="email" >
<label for="password">Password</label>
<input type="password" name="password" />
<label for="password-confirm">Confirm Password</label>
<input type="password" name="password_confirm" id="password-confirm">
<label for="member-group">Member Group</label>
<select name="group_id" id="member-group" class="styled-select">
{select_member_groups}
<option value="{group_id}">{group_title}</option>
{/select_member_groups}
</select>
<label for="client">Associated Client</label>
<select name="client" id="client" class="styled-select">
{embed="clients/_associated" client="{client}"}
</select>
<label for="sceen-name">Screen Name <small>This will be displayed on the site</small></label>
<input type="text" name="screen_name" id="screen-name" >
<label for="occupation">Occupation</label>
<input type="text" name="occupation" id="occupation" >
<label for="bio">Bio</label>
<textarea id="bio" name="bio"></textarea>
<label for="location">Location</label>
<input type="text" name="location" id="location" >
<input type="submit" id="save" value="Save">
</div>
<div class="col-sm-6">
<label for="file">Add Profile Pic</label>
<input type="file" id="file" name="avatar_filename">
<ul class="edit">
<li>
<label for="facebook">Facebook</label>
<input type="text" name="facebook" id="facebook" >
</li>
<li>
<label for="twitter">Twitter</label>
<input type="text" name="twitter" id="twitter" >
</li>
<li>
<label for="linkedin">LinkedIn</label>
<input type="text" name="linkedin" id="linkedin">
</li>
<li>
<label for="website">Website</label>
<input type="text" name="url" id="website"></li>
</ul>
<input type="hidden" name="notifications" value="Opt in" />
<input type="hidden" name="accept_terms" value="y" />
</div>
</div>
{/exp:user:register}
As I say, everything else in the form fills out correctly, it is only the group_id that keeps defaulting to 4. The strange thing is I have an edit form too, which is more or less identical (see below), and upon submitting that the group_id will update correctly.
Here are the differences with the edit form:
Opening tag
{exp:user:edit allowed_groups="5|6|7|8|9" return="profile/{segment_3}"}
Member Group Select
<label for="member-group">Member Group</label>
<select name="group_id" id="member-group" class="styled-select">
{select_member_groups}
<option value="{group_id}" {selected}>{group_title}</option>
{/select_member_groups}
</select>
I have tried the following:
- Added member groups manually (not using the select_member_groups tag).
- Removing the styled-select class which returns the select back to its default styling.
- Disabled any custom extensions that hook into the registration process.
- Added a text field with the id as value.
- I've also tried changing allowed_groups to
group_id=""
All of the above still result in the member group remaining as Pending (ID:4)
Has anyone got any ideas?