Support Forums - Classified Ads Script Osclass
Osclass theme support => Beta Osclass Theme => Topic started by: SriramRajendran on October 26, 2019, 06:08:02 PM
-
Hi,
I don't want the contact publisher form to be editable by the user,
fields such as email and name should not be able to editable by the users, Please help
-
@indiaclassify
In item-send-friend.php of theme find:
<div class="row">
<label for="yourName"><?php _e('Name', 'beta') ; ?><span class="req">*</span></label>
<div class="input-box"><?php ContactForm::your_name(); ?></div>
</div>
<div class="row">
<label for="yourEmail"><span><?php _e('E-mail', 'beta') ; ?></span><span class="req">*</span></label>
<div class="input-box"><?php ContactForm::your_email(); ?></div>
</div>
and replace with:
<?php if(osc_is_web_user_logged_in()) { ?>
<input type="hidden" name="yourName" value="<?php echo osc_esc_html( osc_logged_user_name() ); ?>" />
<input type="hidden" name="yourEmail" value="<?php echo osc_logged_user_email();?>" />
<?php } else { ?>
<div class="row">
<label for="yourName"><?php _e('Name', 'beta') ; ?><span class="req">*</span></label>
<div class="input-box"><?php ContactForm::your_name(); ?></div>
</div>
<div class="row">
<label for="yourEmail"><span><?php _e('E-mail', 'beta') ; ?></span><span class="req">*</span></label>
<div class="input-box"><?php ContactForm::your_email(); ?></div>
</div>
<?php } ?>
Required block is bellow line:
<!-- ITEM CONTACT FORM -->
(there can be more similar blocks)
-
Thanks ! it worked :D