Hi, KK,
submitting information from the admin panel is showing in DBF in the front end but conditional values are not updating from the frontend. Non Conditional fields are updating perfectly.
For superuser, DBF showing success without updating conditional fields
and for other admin user and registered user DBF showing error (of conditional field from employer) as following:
(All the tested user type is Candidate)
I am attaching users/index.php and edit_profile DBF.
users/index.php
edit_profile DBF
submitting information from the admin panel is showing in DBF in the front end but conditional values are not updating from the frontend. Non Conditional fields are updating perfectly.
For superuser, DBF showing success without updating conditional fields
and for other admin user and registered user DBF showing error (of conditional field from employer) as following:
(All the tested user type is Candidate)
I am attaching users/index.php and edit_profile DBF.
users/index.php
- Code: Select all
<?php require_once( '../couch/cms.php' ); ?>
<cms:template clonable='1' title='Users' hidden='1'>
<!-- THIS DISPLAY_IMG IS PERFECTLY WORKING WITH DBF -->
<cms:editable
name='display_img'
label='Display Image'
type='securefile'
allowed_ext='png, jpg, jpeg'
max_size='2048'
crop='1'
thumb_width='300'
thumb_height='300'
show_preview='1'
use_thumb_for_preview='1'
thumb_quality='100'
/>
<!-- PROFILE TYPE -->
<cms:editable
name="user_type"
label="User Type"
desc="Type of user"
opt_values='Candidate | Employer'
type='radio'
required='1'
order='20'
/>
<!-- EMPLOYER'S PROFILE START -->
<cms:func _into='user_type_cond' user_type=''>
<cms:if user_type='Employer' >
show
<cms:else />
hide
</cms:if>
</cms:func>
<cms:editable type='text' name='job_free_posting' label='Free Job Posting Available' desc='No of Free Jobs that can be posted' order='30' not_active=user_type_cond validator='non_negative_integer' required='1'>2</cms:editable>
<cms:editable type='text' name='job_quick_posting' label='Quick Posting Available' desc='No of Quick Jobs that can be posted' order='31' not_active=user_type_cond validator='non_negative_integer' required='1'>0</cms:editable>
<cms:editable
name="job_smart_posting"
label="Smart Package Active"
desc="Type of package"
opt_values='No | Yes'
type='radio'
required='1'
order='35'
not_active=user_type_cond
/>
<cms:editable
name="job_premium_posting"
label="Premium Package Active"
desc="Type of package"
opt_values='No | Yes'
type='radio'
required='1'
order='36'
not_active=user_type_cond
/>
<!-- EMPLOYER'S PROFILE END-->
<!-- CANDIDATE'S PROFILE START (17 EDITABLES) -->
<cms:func _into='user_type_cond' user_type=''>
<cms:if user_type='Candidate' >
show
<cms:else />
hide
</cms:if>
</cms:func>
<cms:editable type='text' name='c_phone' label='Phone Number' not_active=user_type_cond validator='non_negative_integer | exact_len=10' order='70'/>
<cms:editable type='text' name='c_address' label='Address' not_active=user_type_cond order='72'/>
<cms:editable type='text' name='c_age' label='Age' not_active=user_type_cond validator='non_negative_integer' order='73'/>
<cms:editable type='text' name='c_salary' label='Current Salary' not_active=user_type_cond validator='non_negative_integer' order='74' search_type='decimal'/>
<cms:editable type='text' name='c_dob' label='Date of Birth' not_active=user_type_cond order='75' />
<cms:editable
name='c_job_loc'
type='relation'
masterpage='job_loc.php'
label='Preferred Job Location'
no_guix='1'
order='76'
not_active=user_type_cond
/>
<cms:editable
name='c_job_cat'
type='relation'
has='one'
masterpage='job_cat.php'
label='Job Category'
not_active=user_type_cond
no_guix='1'
order='77'
/>
<cms:editable
name='c_job_indus'
type='relation'
has='one'
masterpage='job_indus.php'
label='Job Industry'
not_active=user_type_cond
no_guix='1'
order='78'
/>
<cms:editable
name='c_job_posts'
type='relation'
has='one'
masterpage='job_post.php'
label='Job Level/Designation'
not_active=user_type_cond
no_guix='1'
order='79'
/>
<cms:editable
name="c_job_experience"
label="Candidate Job Experience"
desc="choose job experience"
opt_values='Select Experience =- | Fresher | 0-1 Year | 1-2 Years | 2-3 Years | 3-4 Years | 4-5 Years | More than 5 Years'
type='dropdown'
order='80'
not_active=user_type_cond
/>
<cms:editable
name="c_gender"
label="Candidate Gender"
desc="choose job Gender"
opt_values='Select Gender =- | Male | Female'
type='dropdown'
order='81'
not_active=user_type_cond
/>
<cms:editable type='textarea' name='c_about' label='Candidate About' not_active=user_type_cond order='82' />
<cms:editable type='textarea' name='c_edu' label='Candidate Education' not_active=user_type_cond order='84' />
<cms:editable type='textarea' name='c_work' label='Candidate Work Experience' not_active=user_type_cond order='86' />
<cms:editable type='text' name='c_skill' label='Candidate Skills' not_active=user_type_cond order='88' />
<cms:editable type='textarea' name='c_special' label='Candidate Special Qualification' not_active=user_type_cond order='89' />
<cms:editable type='securefile' name='c_resume' label='Candidate CV' not_active=user_type_cond order='90' allowed_ext='pdf, doc, docx' max_size='4048' />
<!-- CANDIDATE'S PROFILE END-->
</cms:template>
<?php COUCH::invoke(); ?>
edit_profile DBF
- Code: Select all
<cms:set submit_success="<cms:get_flash 'submit_success' />" />
<cms:if submit_success>
<div class="alert alert-success text-center">
<h6 style='color:green'>Your profile has been successfully updated.</h6>
</div>
</cms:if>
<cms:form
masterpage='users/index.php'
mode='edit'
page_id=k_user_id
enctype="multipart/form-data"
method='post'
anchor='0'
name='edit_profile_form'
class="dashboard-form">
<cms:if k_success >
<cms:db_persist_form
c_job_loc=frm_selected_locations
c_skill=frm_selected_skill_tags
/>
<cms:if k_error>
<div class="alert alert-danger">
<strong>Could not edit your profile!</strong><br />
The following error(s) occured while updating your profile:<br />
<ul>
<cms:each k_error>
<li>
<cms:show item />
</li>
</cms:each>
</ul>
</div>
<cms:else />
<cms:set_flash name='submit_success' value='1' />
<cms:redirect "<cms:route_link 'edit_profile_view' masterpage='candidate-dashboard.php' />" />
</cms:if>
</cms:if>
<div class="row mx-5 mb-5">
<div class="dashboard-section upload-profile-photo ">
<div class="update-photo">
<img class="image" src="<cms:show display_img_url />" alt="">
</div>
<!-- DISPLAY IMG UPLOAD WORKING AS IT IS NOT AFFECTED BY CONDITION -->
<div class="file-upload">
<cms:input type="bound" name='display_img' class="file-input"/>
</div>
</div>
<div class="col-sm-6 align-baseline">
<cms:input type='bound' name='c_resume' class="button" />
</div>
</div>
<div class="dashboard-section basic-info-input">
<h4><i data-feather="user-check"></i>Basic Info</h4>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Full Name</label>
<div class="col-sm-9">
<!-- TITLE WORKING AS IT IS NOT AFFECTED BY CONDITION -->
<cms:input type="bound" name='k_page_title' class="form-control" placeholder="Full Name" />
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Username</label>
<div class="col-sm-9">
<input type="text" class="form-control" placeholder="@<cms:show k_user_name />" disabled>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Email Address</label>
<div class="col-sm-9">
<input type="text" class="form-control" placeholder="<cms:show k_user_email /> " disabled>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Phone</label>
<div class="col-sm-9">
<cms:input type="bound" name='c_phone' class="form-control" placeholder="9910878787"/>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Address</label>
<div class="col-sm-9">
<cms:input type="bound" name='c_address' class="form-control" placeholder="Washington D.C"/>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Gender</label>
<div class="col-sm-9">
<cms:input type="bound" name='c_gender' class="form-control" placeholder="Washington D.C"/>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Age</label>
<div class="col-sm-9">
<cms:input type="bound" name='c_age' class="form-control" placeholder="24"/>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Date of Birth</label>
<div class="col-sm-9">
<cms:input type="bound" name='c_dob' class="form-control" placeholder="25 March, 1990"/>
</div>
</div>
</div>
<div class="dashboard-section basic-info-input">
<h4><i data-feather="user-check"></i>Job Related Info</h4>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Job Category</label>
<div class="col-sm-9">
<cms:input type="bound" name='c_job_cat' class="form-control" />
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Industry Expertise</label>
<div class="col-sm-9">
<cms:input type="bound" name='c_job_indus' class="form-control" />
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Job Post/Designation</label>
<div class="col-sm-9">
<cms:input type="bound" name='c_job_posts' class="form-control" />
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Experience</label>
<div class="col-sm-9">
<cms:input type="bound" name='c_job_experience' class="form-control" />
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Current Salary</label>
<div class="col-sm-9">
<cms:input type="bound" name='c_salary' class="form-control" />
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Preferred Locations</label>
<div class="col-sm-9">
<select class="form-control myselect2" multiple="multiple"></select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Skill Tags</label>
<div class="col-sm-9">
<select class="form-control myselect2-tags" multiple="multiple"></select>
</div>
</div>
</div>
<cms:input type='text' style='display: none;' name='selected_locations' id='selected_locations' value="<cms:show selected_locs/>" />
<cms:input type='text' style='display: none;' name='selected_skill_tags' id='selected_skill_tags' value="<cms:show c_skill/>" />
<div class="dashboard-section basic-info-input">
<h4><i data-feather="lock"></i>About Me</h4>
<div class="form-group row">
<div class="col-sm-12">
<cms:input type="bound" name='c_about' class="form-control" placeholder="Write your educatioin background" />
</div>
</div>
</div>
<div class="dashboard-section basic-info-input">
<h4><i data-feather="lock"></i>Education & Qualifications</h4>
<div class="form-group row">
<div class="col-sm-12">
<cms:input type="bound" name='c_edu' class="form-control" placeholder="Write your educatioin background" />
</div>
</div>
</div>
<div class="dashboard-section basic-info-input">
<h4><i data-feather="lock"></i>Work Experience</h4>
<div class="form-group row">
<div class="col-sm-12">
<cms:input type="bound" name='c_work' class="form-control" placeholder="Write your educatioin background" />
</div>
</div>
</div>
<div class="dashboard-section basic-info-input">
<h4><i data-feather="lock"></i>Special Qualifications</h4>
<div class="form-group row">
<div class="col-sm-12">
<cms:input type="bound" name='c_special' class="form-control" placeholder="Write your educatioin background" />
</div>
</div>
</div>
<div class="dashboard-section basic-info-input">
<h4><i data-feather="lock"></i>Change Password</h4>
<div class="form-group row">
<label class="col-sm-3 col-form-label">New Password</label>
<div class="col-sm-9">
<input type="password" class="form-control" placeholder="New Password">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label">Retype Password</label>
<div class="col-sm-9">
<input type="password" class="form-control" placeholder="Retype Password">
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label"></label>
<div class="col-sm-9">
<button type='submit' class="button">Save Change</button>
</div>
</div>
</div>
</cms:form>