Skip Navigation

[Resolved] Call to Phone for customer Filed which is being updated via Post From, Need help

This support ticket is created 3 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by irfanA 3 years, 11 months ago.

Assisted by: Shane.

Author
Posts
#1901321

Tell us what you are trying to do?
what to make Click to Call Button via Custom Post so user can add phone number over Front End Post From

Is there any documentation that you are following?
Not Found
Is there a similar example that we can see?

I am using two field to achieve this but want to make it automated.

Phone Number Filed: 004915735589800
Phone Link Filed: tel:004915735589800

Phone Filed is being updated via front End Post Form from customer.
Where as Link has been maully updated and then using it on following page as Link to Button.

hidden link

Hope got my point if still need some further info do let me know

What is the link to your site?
hidden link

#1901571

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Irfan,

Thank you for getting in touch.

In order to do this you will need to manually make the button like this

<a href="tel:+[types field='my-number'][/types]">Call Me</a>

Ofcourse you will replace the my-number with the slug of the number custom field that you've created. Secondly you need to add this to the HTML editor version of the Classic editor block.

Please let me know if this helps.
Thanks,
Shane

#1901705

Hi Thanks, It's working but the problem is if shows even though if there is no value behind it but in case of button it shoes only then if there is a value. can you help me for that so that it shows only then if there is some value.

#1901769

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Irfan,

In a case like this you can make use of the conditional block.
https://toolset.com/course-lesson/using-toolset-conditional-block/

Thanks,
Shane

#1902197
toolset.PNG

Hi Shane,

thanks i got it but now I have small issue have made the same for email as well as below but am getting below results.

<p style="text-align: center;">Email</p>

Need your help to fix it.

#1902433

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Irfan,

It seems to me that the HTML logic is broken when you're adding it to the frontend.


<p style="text-align: center;"><a href="mailto:[types field='e-mail'][/types]">Email</a></p>

From what I can see the markup is correct. Would you mind allowing me to have admin access to the site if copying and pasting my code above doesn't work ?

I've enabled the private fields for your next response.

Thanks,
Shane

#1903119

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Irfan,

This should be working now. You needed to have added the output='raw' attribute to the types field shortcode.

The reason for this is that the shortcode will automatically render the field as a mailto link.

Thanks,
Shane

#1903651

My issue is resolved now. Thank you!

#1913033

It's happening again can you please recheck this issue
using as below :

<p style="text-align: center;">Email</p>