Osclass Support Forums

Osclass theme support => Veronika Osclass Responsive Theme => Topic started by: Anonymous on January 26, 2018, 01:06:36 PM

Title: show_phone_checkbox
Post 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,
Code: [Select]
   <?php ItemForm::show_phone_checkbox() ; ?>
Code: [Select]
   <?php ItemForm::show_email_checkbox() ; ?>
thats core function of check email, how to create same for phone,
looking for help.

Quote
  <?php ItemForm::show_phone_checkbox(); ?> <label for="showPhone"><?php _e('Show Phone on the listing page', 'veronika'); ?></label>

Code: [Select]
  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;
        }
Title: Re: show_phone_checkbox
Post by: MB Themes on January 26, 2018, 10:12:50 PM
Such field is not in database.
Title: Re: show_phone_checkbox
Post by: Anonymous on January 27, 2018, 01:42:57 AM
How we can create a check box! For showing or hiding mobile phone on item publish page.
Just like email on publish page.
Title: Re: show_phone_checkbox
Post by: MB Themes on January 27, 2018, 11:35:06 PM
@Anonymous
- create new field in database
- duplicate function on item-post.php
- update item.php
Title: Re: show_phone_checkbox
Post by: Anonymous on January 28, 2018, 12:23:36 PM
Code: [Select]
  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  ???
Title: Re: show_phone_checkbox
Post by: MB Themes on January 31, 2018, 09:45:39 PM
@Anonymous
You have function, now it must be added into hook as well as database field created i item table.
Title: Re: show_phone_checkbox
Post by: Anonymous on February 02, 2018, 08:44:58 AM
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!
 :-[
Title: Re: show_phone_checkbox
Post by: atba on March 30, 2020, 11:41:31 PM
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...
Title: Re: show_phone_checkbox
Post by: MB Themes on March 31, 2020, 08:46:06 AM
@atba
It is doable as custom work, but it needs updates in database as well.
Title: Re: show_phone_checkbox
Post by: atba on March 31, 2020, 10:00:56 AM
OK. What is necessary for this?
Title: Re: show_phone_checkbox
Post by: MB Themes on April 01, 2020, 02:39:14 PM
@atba
You may send your requirements to [email protected]