Skip Navigation

[Resuelto] Add a Bootstrap Glyphicon in the submit text

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:

The issue here is that the user wanted to add a Glyphicon to the toolset forms submit button.

Solution:

You will possibly need to use the method below in order to achieve it.
https://jsfiddle.net/y6xtuj4c/317/

This support ticket is created hace 6 años, 4 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 8 respuestas, tiene 2 mensajes.

Última actualización por Pat hace 6 años, 4 meses.

Asistido por: Shane.

Autor
Mensajes
#921216

Pat

Hello,

I'm using Forms and would like to intégrate a Glyphicon near the submit texte.
I have tried this :
[cred_field field='form_submit' value='<span class="glyphicon glyphicon-heart" aria-hidden="true"></span> AJOUT A MA LISTE' urlparam='' class='btn btn-primary' output='bootstrap']
But this is not working (the <span> is not taken into account and everything is considered as texte).

Regards
Pat

#921350

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Pat,

Thank you for contacting our support forum.

What you can do is to create a regular submit button using HTML instead of the shortcode, then you can add the glyphicon to this replacement button.

Thanks,
Shane

#921380

Pat

Hi Shane,

Thanks for your answer.
Could you give me an example of the HTML code that would replace this shortcode?
Thanks
Pat

#921400

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Pat,

You can use the code below to replace the form shortcode.

<input type="submit" class="btn btn-primary btn-lg" name="form_submit_1" value="submit">

Please let me know if this helps.
Thanks,
Shane

#921425

Pat

Hi Shane,

Just tested this
<input type="submit" class="btn btn-primary btn-lg" name="form_submit_1" value="<span class='glyphicon glyphicon-heart' aria-hidden='true'></span> AJOUT A MA LISTE">

and the result is the same as with the shortcode (ie : everything is considered as text !).
Let me know
Regards
Pat

#921426

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Pat,

Try it like this.

  <button type="submit" value="Submit"><span class='glyphicon glyphicon-heart' aria-hidden='true'></span> AJOUT A MA LISTE</button>

This should work. I've tested this locally.

Thanks,
Shane

#921447

Pat

Hi Shane,

I have tried those 2 solutions inside the Forms :

<button type="submit" value="Submit" class="btn btn-primary">AJOUT A MA LISTE <span style="width:auto !important;"class="glyphicon glyphicon-heart" aria-hidden="true"></span></button>

[cred_field field='form_submit' value='AJOUT A MA LISTE' urlparam='' class='btn btn-primary' output='bootstrap']

Your solution (1° woks in terms of display, but does not create any post. Only the solution (2) with shortcode creates a post.
Any idea?
Regards
Pat

#921767

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Pat,

I see what you are saying.

I think this is because of a unique code that the form is generating each time for the submit button.

You will possibly need to use the method below in order to achieve it.
enlace oculto

Wrap the tags around the submit shortcode and it should allow you to add the icon.

Thanks,
Shane

#923101

Pat

Hi Shane
Thanks for your support.
Regards
Pat