Jump to content
  • 0

About gender while registeration [fluxcp]


Diana

Question


  • Group:  Members
  • Topic Count:  85
  • Topics Per Day:  0.03
  • Content Count:  194
  • Reputation:   3
  • Joined:  12/17/16
  • Last Seen:  

In fluxcp the gender type is "radio" and look like this : 

pTTZJyr.png

I want to make it as  "select" 

like this : 

lEngfaI.png

I tried to change this : 

				<p>
					<label><input type="radio" name="gender" id="register_gender_m" value="M"<?php if ($params->get('gender') === 'M') echo ' checked="checked"' ?> /> <?php echo $this->genderText('M') ?></label>
					<label><input type="radio" name="gender" id="register_gender_f" value="F"<?php if ($params->get('gender') === 'F') echo ' checked="checked"' ?> /> <?php echo $this->genderText('F') ?></label>
				</p>

to be like this : 

				<select>
					<option><input type="radio" name="gender" id="register_gender_m" value="M"<?php if ($params->get('gender') === 'M') echo ' checked="checked"' ?> /> <?php echo $this->genderText('M') ?></option>
					<option><input type="radio" name="gender" id="register_gender_f" value="F"<?php if ($params->get('gender') === 'F') echo ' checked="checked"' ?> /> <?php echo $this->genderText('F') ?></option>
				</select>

But tell me an error : You should choose M or F . 

Please can anyone help me??

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  17
  • Reputation:   5
  • Joined:  01/06/12
  • Last Seen:  

Try:

<select name="gender">
  <option disabled>-Select-</option>
	<option id="register_gender_m" value="M"<?php if ($params->get('gender') === 'M') echo ' selected' ?>>Male</option>
	<option id="register_gender_f" value="F"<?php if ($params->get('gender') === 'F') echo ' selected' ?>>Female</option>
</select>
  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  85
  • Topics Per Day:  0.03
  • Content Count:  194
  • Reputation:   3
  • Joined:  12/17/16
  • Last Seen:  

@luanwg Thank you very much <3 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  97
  • Reputation:   2
  • Joined:  04/27/16
  • Last Seen:  

Thanks

 

Edited by rmon
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...