Osclass Support Forums
Osclass theme support => Veronika Osclass Responsive Theme => Topic started by: Anonymous on January 26, 2018, 01:06:36 PM
-
hi,
thats show email checkbox on item post.php function,
how to create same for phone,
<?php ItemForm::show_phone_checkbox() ; ?>
<?php ItemForm::show_email_checkbox() ; ?>
thats core function of check email, how to create same for phone,
looking for help.
<?php ItemForm::show_phone_checkbox(); ?> <label for="showPhone"><?php _e('Show Phone on the listing page', 'veronika'); ?></label>
static public function show_email_checkbox($item = null) {
if($item==null) { $item = osc_item(); };
if( Session::newInstance()->_getForm('showEmail') != 0) {
$item['b_show_email'] = Session::newInstance()->_getForm('showEmail');
}
parent::generic_input_checkbox('showEmail', '1', (isset($item['b_show_email']) ) ? $item['b_show_email'] : false );
return true;
}
-
Such field is not in database.
-
How we can create a check box! For showing or hiding mobile phone on item publish page.
Just like email on publish page.
-
@Anonymous
- create new field in database
- duplicate function on item-post.php
- update item.php
-
static public function show_phone_checkbox($item = null) {
if($item==null) { $item = osc_item(); };
if( Session::newInstance()->_getForm('showPhone') != 0) {
$item['b_show_phone'] = Session::newInstance()->_getForm('showPhone');
}
parent::generic_input_checkbox('showPhone', '1', (isset($item['b_show_phone']) ) ? $item['b_show_phone'] : false );
return true;
}
wheres am wrong! pls point out ???
-
@Anonymous
You have function, now it must be added into hook as well as database field created i item table.
-
yes! i did everything also created a new field for mobile, b_show_phone thats not works. 0 and 1
its seems impossible to create such function!
:-[
-
Question MB-Theme))) How to solve the problem with the lack of a checkbox for the phone number field? Can you help at least on a paid basis? Thank you in advance for your answer...
-
@atba
It is doable as custom work, but it needs updates in database as well.
-
OK. What is necessary for this?
-
@atba
You may send your requirements to [email protected]