Skip Navigation

[Resolved] Add a Bootstrap Glyphicon in the submit text

This thread is resolved. Here is a description of the problem and solution.

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 6 years, 5 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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)

This topic contains 8 replies, has 2 voices.

Last updated by Pat 6 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#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

Languages: English (English )

Timezone: 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

Languages: English (English )

Timezone: 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

Languages: English (English )

Timezone: 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

Languages: English (English )

Timezone: 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.
hidden link

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