Hi Anjo. Thenx for your unswer.
I have these code:
<div class="uk-form uk-form-horizontal j4a=reg-form">
<div class="uk-text-center uk-form-row j4a-user-reg-select">
<h3 class="uk-text-center j4a-user-reg-select-label"><?php echo JText::_( 'COM_CCK_DESCRIPTION_REG' );?></h3>
<?php echo $cck->getForm( 'user_type_registration' ); ?>
</div>
<?php echo $cck->getForm( 'reg_to_user_groups' );?>
</div>
<div class="uk-form uk-form-horizontal">
<?php echo $cck->getForm( 'txt_welcome' );?>
</div>
<div class="uk-form uk-form-horizontal">
<div class="uk-grid j4a-reg-text-fields">
<div class="uk-width-1-2"><?php echo $cck->getForm( 'user_username' ); ?></div>
<div class="uk-width-1-2"><?php echo $cck->getForm( 'user_name' ); ?></div>
<div class="uk-width-1-2"><?php echo $cck->getForm( 'last_name' ); ?></div>
<div class="uk-width-1-2"><?php echo $cck->getForm( 'employer_name' ); ?></div>
<div class="uk-width-1-2"><?php echo $cck->getForm( 'user_password' ); ?></div>
<div class="uk-width-1-2"><?php echo $cck->getForm( 'user_password2' ); ?></div>
<div class="uk-width-1-2"><?php echo $cck->getForm( 'user_email' ); ?></div>
<div class="uk-width-1-2"><?php echo $cck->getForm( 'j4a_country' ); ?></div>
<div class="uk-width-1-2"><?php echo $cck->getForm( 'region' ); ?></div>
<div class="uk-width-1-2"><?php echo $cck->getForm( 'city' ); ?></div>
<div class="uk-width-1-2"><?php echo $cck->getForm( 'user_address1' ); ?></div>
<div class="uk-width-1-2"><?php echo $cck->getForm( 'div_start' ); ?></div>
<div class="uk-width-1-2"><?php echo $cck->getForm( 'button_save_close' ); ?></div>
<div class="uk-width-1-2"><?php echo $cck->getForm( 'button_cancel' ); ?></div>
<div class="uk-width-1-2"><?php echo $cck->getForm( 'div_end' ); ?></div>
</div>
</div><br>
Field "user_type_registration" it's - Radio Field and have cuple options and Custom Attributes:
Field "reg_to_user_groups" - Text Field. In number 5, I enter these:
I See these lesson: Playing with Conditional States & Triggers
+ I enter for the test these (In number 5) - Field "user_name":
When (on fron view), I click on first options (JOB_SEEKER=2) in Radio field "user_type_registration", I'm waiting for:
- into field "reg_to_user_groups", I see number 2;
- field "user_name", stay visible on the site.
When (on front view), I click on second options (EMPLOYER=10) in Radio field "user_type_registration", I'm waiting for:
- into field "reg_to_user_groups", I see number 10;
- field "user_name", hide on the site.
BUT! When I click on field "user_type_registration" (for any options), nothing happens...
I heard that I can write this code:
$myFields = $cck->getFields('mainbody');
if (!empty($myFields)) {
foreach ($myFields as $myField) {
$myField=$cck->get('myFieldName');
if ($myField->conditional) {
$this->setConditionalStates($myField);
};
};
};
P. S.
When I disable the custom template, Conditional States - work
----------------------------------------------------------------------------------------------------------------
P. P. S.
I think I understand what the problem is ... I using getForm instead renderField because I, in this form, the output label - no need to... Most likely, because getForm Conditional States - NOT work...