*

Anonymous

  • ****
  • 200 posts
show_phone_checkbox
« 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;
        }
Innovation is change that unlocks new value  ;)

*

MB Themes

Re: show_phone_checkbox
« Reply #1 on: January 26, 2018, 10:12:50 PM »
Such field is not in database.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Anonymous

  • ****
  • 200 posts
Re: show_phone_checkbox
« Reply #2 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.
Innovation is change that unlocks new value  ;)

*

MB Themes

Re: show_phone_checkbox
« Reply #3 on: January 27, 2018, 11:35:06 PM »
@Anonymous
- create new field in database
- duplicate function on item-post.php
- update item.php
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Anonymous

  • ****
  • 200 posts
Re: show_phone_checkbox
« Reply #4 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  ???
Innovation is change that unlocks new value  ;)

*

MB Themes

Re: show_phone_checkbox
« Reply #5 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.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Anonymous

  • ****
  • 200 posts
Re: show_phone_checkbox
« Reply #6 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!
 :-[
Innovation is change that unlocks new value  ;)

*

atba

  • ****
  • 193 posts
Re: show_phone_checkbox
« Reply #7 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...
osclass.by

*

MB Themes

Re: show_phone_checkbox
« Reply #8 on: March 31, 2020, 08:46:06 AM »
@atba
It is doable as custom work, but it needs updates in database as well.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

atba

  • ****
  • 193 posts
Re: show_phone_checkbox
« Reply #9 on: March 31, 2020, 10:00:56 AM »
OK. What is necessary for this?
« Last Edit: March 31, 2020, 10:02:52 AM by atba »
osclass.by

*

MB Themes

Re: show_phone_checkbox
« Reply #10 on: April 01, 2020, 02:39:14 PM »
@atba
You may send your requirements to [email protected]
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots