Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Register form Username input hidden (solved)

10 years 3 months ago
  • Danny's Avatar
    Topic Author
  • Danny
  • Offline
  • Fresh Boarder
  • Posts: 27
  • Thank you received: 1
Licenses:
JomSocial Expired

Hello,

in register.index.php I will hidden field

<li>
		<label id="jsnamemsg" for="jsname" class="form-label"><?php echo JText::_( 'COM_COMMUNITY_NAME' ); ?><span class="required-sign">&nbsp;*</span></label>

		<div class="form-field">
		    <input type="text" name="jsname" id="jsname" value="<?php echo $data['html_field']['jsname']; ?>" class="input text required validate-name" style="width: 70%" />
			<span id="errjsnamemsg" style="display:none;">&nbsp;</span>
		</div>
	</li>

This field is automatically adjusted using the field ( 'COM_COMMUNITY_USERNAME' ) entered data are sent filled.
I will not use differnet Names and Usernames in Community because some components use Username, some use Name.
What can I change in this file so that the Name field is filled automatically with the entry in the User Name field and sent?
The field Name I would set to hidden.

Thank U.
Greets Danny
Greets Danny

10 years 3 months ago
Licenses:

Hi Danny,

please follow this step:
1. replace line 44 - 51 with this:

<input type="hidden" id="jsname" name="jsname">
2. scroll down to line 149. below that line (line 150), insert this new script
joms.jQuery('#jsname').val(joms.jQuery('#jsusername').val());
this script for put username value into name if user submit the form.

if that step not clear or confusing for you, please provide me the FTP detail at site info. I will do ti for you

Cheers,
Albert

10 years 3 months ago
  • Danny's Avatar
    Topic Author
  • Danny
  • Offline
  • Fresh Boarder
  • Posts: 27
  • Thank you received: 1
Licenses:
JomSocial Expired

Thank U very much.
I understand this.
Are these lines allright near line 150?

if(joms.jQuery('#authenticate').val() != '1')
	{
		joms.registrations.authenticate();
		joms.jQuery('#jsname').val(joms.jQuery('#jsusername').val());
		return false;
	}

Greets Danny

10 years 3 months ago
Licenses:

joms.jQuery( '#jomsForm' ).submit( function(){
        joms.jQuery('#btnSubmit').hide();
	joms.jQuery('#cwin-wait').show();
	joms.jQuery('#jomsForm input').attr('readonly', true);

	if(joms.jQuery('#authenticate').val() != '1')
	{
		joms.registrations.authenticate();
		return false;
	}
});

changing into:
joms.jQuery( '#jomsForm' ).submit( function(){
        joms.jQuery('#jsname').val(joms.jQuery('#jsusername').val());
        joms.jQuery('#btnSubmit').hide();
	joms.jQuery('#cwin-wait').show();
	joms.jQuery('#jomsForm input').attr('readonly', true);

	if(joms.jQuery('#authenticate').val() != '1')
	{
		joms.registrations.authenticate();
		return false;
	}
});

If this ticket already done, pls change the ticket status into resolved. And if you happy with my support. pls click thank you at below ;-)

cheers,
Albert

The following user(s) said Thank You: Danny
Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW