Osclass Support Forums

Osclass plugin support => Attributes Plugins => Topic started by: Ashwathy Achu on July 01, 2018, 01:38:19 PM

Title: Keyboard Change
Post by: Ashwathy Achu on July 01, 2018, 01:38:19 PM
Multilanguage Attributes Plugin Phone number field how to change like this?
Title: Re: Keyboard Change
Post by: MB Themes on July 01, 2018, 02:35:33 PM
Type of input must be "phone". Layout depends on browser and device.
Title: Re: Keyboard Change
Post by: Ashwathy Achu on July 01, 2018, 06:43:23 PM
How to change input type ? TEXT to TEL
Title: Re: Keyboard Change
Post by: MB Themes on July 02, 2018, 12:34:25 PM
@Ashwathy
Select attribute field to be Phone number.
Title: Re: Keyboard Change
Post by: Ashwathy Achu on July 02, 2018, 01:54:33 PM
please understand my question
Title: Re: Keyboard Change
Post by: Ashwathy Achu on July 02, 2018, 03:24:14 PM
First input field -TEXT
second input field - TEL

I want Multilanguage Attributes Plugin Phone number field like second one
Title: Re: Keyboard Change
Post by: Ashwathy Achu on July 02, 2018, 03:30:33 PM
IMAGE 1 -   First input field -TEXT

IMAGE 2 -   First input field -TEL
Title: Re: Keyboard Change
Post by: MB Themes on July 03, 2018, 12:15:04 PM
in file:
/oc-content/plugins/attributes/functions.php

find line:
Code: [Select]
      } else if ($a['s_type'] == 'TEXT' || $a['s_type'] == 'PHONE' || $a['s_type'] == 'EMAIL' || $a['s_type'] == 'URL') {
        $html .= '<input type="' . strtolower($a['s_type']) . '" id="atr_' . $a['pk_i_id'] . '" name="atr_' . $a['pk_i_id'] . '" placeholder="' . atr_input_placeholder($a['s_type']) . '" value="' . $item_atr['s_value'] . '" ' . $required . '/>';


replace with:
Code: [Select]
     } else if ($a['s_type'] == 'TEXT' || $a['s_type'] == 'PHONE' || $a['s_type'] == 'EMAIL' || $a['s_type'] == 'URL') {
        $input_type = strtolower($a['s_type'] == 'PHONE' ? 'TEL' : $a['s_type']);
        $html .= '<input type="' . $input_type . '" id="atr_' . $a['pk_i_id'] . '" name="atr_' . $a['pk_i_id'] . '" placeholder="' . atr_input_placeholder($a['s_type']) . '" value="' . $item_atr['s_value'] . '" ' . $required . '/>';
Title: Re: Keyboard Change
Post by: Ashwathy Achu on July 03, 2018, 12:44:19 PM
Not working
Title: Re: Keyboard Change
Post by: MB Themes on July 03, 2018, 01:26:31 PM
After change, input type is "tel"
Code: [Select]
<div class="control-group atr-type-phone" id="atr-phone"><label class="control-label" for="atr6">Contact Phone</label><div class="controls"><input type="tel" id="atr_6" name="atr_6" placeholder="+" value=""></div></div>
Title: Re: Keyboard Change
Post by: Ashwathy Achu on July 03, 2018, 05:01:03 PM
Where to add
Title: Re: Keyboard Change
Post by: MB Themes on July 03, 2018, 05:10:57 PM
If you ask such question, you've probably have not followed guide I've sent you.
Title: Re: Keyboard Change
Post by: Ashwathy Achu on July 03, 2018, 06:39:15 PM
Check

http://prntscr.com/k240gc
Title: Re: Keyboard Change
Post by: MB Themes on July 03, 2018, 08:22:01 PM
Yes and if you select attribute of type phone, it will have input type tel.
Title: Re: Keyboard Change
Post by: Ashwathy Achu on July 03, 2018, 08:36:19 PM
After change, input type is "tel"
Code: [Select]
<div class="control-group atr-type-phone" id="atr-phone"><label class="control-label" for="atr6">Contact Phone</label><div class="controls"><input type="tel" id="atr_6" name="atr_6" placeholder="+" value=""></div></div>

First where to add this code
Title: Re: Keyboard Change
Post by: Ashwathy Achu on July 03, 2018, 08:40:44 PM
in file:
/oc-content/plugins/attributes/functions.php

find line:
Code: [Select]
      } else if ($a['s_type'] == 'TEXT' || $a['s_type'] == 'PHONE' || $a['s_type'] == 'EMAIL' || $a['s_type'] == 'URL') {
        $html .= '<input type="' . strtolower($a['s_type']) . '" id="atr_' . $a['pk_i_id'] . '" name="atr_' . $a['pk_i_id'] . '" placeholder="' . atr_input_placeholder($a['s_type']) . '" value="' . $item_atr['s_value'] . '" ' . $required . '/>';


replace with:
Code: [Select]
     } else if ($a['s_type'] == 'TEXT' || $a['s_type'] == 'PHONE' || $a['s_type'] == 'EMAIL' || $a['s_type'] == 'URL') {
        $input_type = strtolower($a['s_type'] == 'PHONE' ? 'TEL' : $a['s_type']);
        $html .= '<input type="' . $input_type . '" id="atr_' . $a['pk_i_id'] . '" name="atr_' . $a['pk_i_id'] . '" placeholder="' . atr_input_placeholder($a['s_type']) . '" value="' . $item_atr['s_value'] . '" ' . $required . '/>';

Not working this code
Title: Re: Keyboard Change
Post by: Ashwathy Achu on July 07, 2018, 12:08:42 PM
How to solve?
Title: Re: Keyboard Change
Post by: MB Themes on July 07, 2018, 01:58:39 PM
From plugin point of view, everything is as it shoul (input type = tel).
Title: Re: Keyboard Change
Post by: Ashwathy Achu on July 07, 2018, 03:42:17 PM
okay But there are no changes
Title: Re: Keyboard Change
Post by: Ashwathy Achu on July 11, 2018, 07:17:27 PM
look this attribute plugin image

First image type email address
Second image type website address
Title: Re: Keyboard Change
Post by: MB Themes on July 11, 2018, 07:18:17 PM
Well you may contact your phone support or operating system support to change keyboard layout.
Title: Re: Keyboard Change
Post by: Ashwathy Achu on July 11, 2018, 07:23:38 PM
I try at a lot of phones but nothing change
Title: Re: Keyboard Change
Post by: Ashwathy Achu on July 11, 2018, 07:27:28 PM
you need FTP details?
Title: Re: Keyboard Change
Post by: MB Themes on July 11, 2018, 07:40:00 PM
No, I am not mobile keyboard developer.
Title: Re: Keyboard Change
Post by: Ashwathy Achu on July 11, 2018, 08:37:47 PM
I know you're not mobile keyboard developer.
Title: Re: Keyboard Change
Post by: MB Themes on July 11, 2018, 09:19:04 PM
You can find all supported input types by html here:
https://www.w3schools.com/Html/html_form_input_types.asp
Title: Re: Keyboard Change
Post by: Ashwathy Achu on July 12, 2018, 12:30:42 PM
finally problem solved
Title: Re: Keyboard Change
Post by: Александр Лонгардт on July 16, 2018, 11:32:22 PM
finally problem solved

How did you decide to enter numbers in the phone field can ?