This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

Hugo

  • ****
  • 186 posts
Prefix not showing
« on: January 25, 2023, 07:03:30 PM »
How does it come that the prefix doesn't show up on the specific place that i have the code assigned for?

In oc-admin i have it enabled as: input[name="SQPhone"]

The field has the following html: <input type="tel" name="SQPhone" id="SQPhone" placeholder="+1-xxx-xxxx-xxx" required="">

It is in a custom made php inquiry form and not from Osclass.

*

MB Themes

Re: Prefix not showing
« Reply #1 on: January 26, 2023, 10:08:51 PM »
@Hugo
Is script loaded on site? No javascript errors?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Hugo

  • ****
  • 186 posts
Re: Prefix not showing
« Reply #2 on: January 26, 2023, 10:12:48 PM »
I assume yes, since it does work on the registration page

*

MB Themes

Re: Prefix not showing
« Reply #3 on: January 27, 2023, 09:58:45 AM »
@hugo
it works on registration page, becasue it is added to this page via hooks. But it may not be present on other pages.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Hugo

  • ****
  • 186 posts
Re: Prefix not showing
« Reply #4 on: January 27, 2023, 01:31:23 PM »
Okay, how can I enable it on the single item page for the contact form? (as well on custom created php contact forms)

*

MB Themes

Re: Prefix not showing
« Reply #5 on: January 27, 2023, 02:53:56 PM »
@Hugo
You must take that JS code function from plugin and put it on place where you need it.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Hugo

  • ****
  • 186 posts
Re: Prefix not showing
« Reply #6 on: January 27, 2023, 10:58:30 PM »
Could you please tell me which specific file?

Marked as best answer by frosticek on February 09, 2023, 03:22:51 PM
*

MB Themes

Re: Prefix not showing
« Reply #7 on: January 28, 2023, 09:00:18 AM »
@Hugo
Checked code.
Go to index.php, find this line:
Code: [Select]
function sms_js() {

Below, there is condition:
Code: [Select]
    if(((osc_is_web_user_logged_in() && $location == 'user' || osc_is_register_page() || osc_is_login_page()) && sms_param('verification_account') == 1) || ((osc_is_publish_page() || osc_is_edit_page()) && sms_param('verification_listing') == 1) || ($location == 'sms' && $section == 'item-verify' && sms_param('verification_listing') == 1) || ($location == 'sms' && $section == 'user-verify' && sms_param('verification_account') == 1)) {

change it to:
Code: [Select]
if(1==1) {
So javascript will show up on every page in footer.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots