protected function _renderdivs( )
{
$return = $this->_renderRegistrationHead()
. '<div id="registrationTable" class="cbRegistrationDiv">'
. $this->tabContent
. '<div class="row no-gutters cbRegistrationButtons">'
. '<div class="offset-sm-3 col-sm-9">'
. '<input type="submit" value="' . $this->registerButton . '" class="btn btn-primary btn-sm-block cbRegistrationSubmit"' . cbValidator::getSubmitBtnHtmlAttributes() . ' />'
. '</div>'
. '</div>'
. $this->_renderRegistrationFooter();
echo $return;
}
protected function _renderdivs( )
{
$return = $this->_renderRegistrationHead()
. '<div id="registrationTable" class="cbRegistrationDiv">'
. $this->tabContent
. '<div class="row no-gutters cbRegistrationButtons">'
. '<div class="offset-sm-3 col-sm-9">'
. '<input type="submit" value="' . $this->registerButton . '" class="btn btn-primary btn-sm-block cbRegistrationSubmit"' . cbValidator::getSubmitBtnHtmlAttributes() . ' />'
. '</div>'
. '</div>'
. '</div><script> $(function() { $(\'input[name="cb_registeras"]\').on(\'click\', function() { var btnname= $(this).val(); if(btnname=="Person"){$("#cblabname").html(\'First and Last name\');}else{$("#cblabname").html(\'Company Name\');} });});</script>'
. $this->_renderRegistrationFooter();
echo $return;
}
Please Log in to join the conversation.
I apologize for the delay. We're seeing pretty high volume of requests and looks like yours slipped through. We're working our way through those we missed.After i submitted a request for the business membership and did not receive a reply for a few days
I do not recommend modifying core code. If I recall correctly you just want to conditionally change the label of a field during registration based off another fields value?The script is the following (in case someone needs something like this...
Please Log in to join the conversation.
we used the javascript in components/com_comprofiler/plugin/templates/default/default.php.Best I can suggest is you'll need to consider implementing that yourself using some custom JavaScript.
Please Log in to join the conversation.
$( '#FIELD_NAME_1' ).on( 'change', function() {
if ( $( this ).val() === 'company' ) {
$( '#cblabFIELD_NAME_2' ).html( 'Company' );
} else {
$( '#cblabFIELD_NAME_2' ).html( 'Name' );
}
});
Please Log in to join the conversation.
$( '#cb_registeras' ).on( 'change', function() {
if ( $( this ).val() === 'Company' ) {
$( '#cblabname' ).html( 'Company Name' );
} else {
$( '#cblabname' ).html( 'First and Last name' );
}
});
Please Log in to join the conversation.
Please Log in to join the conversation.