FoxInCloud
Change the backcolor button in bootstrap mode.
Gravatar is a globally recognized avatar based on your email address. Change the backcolor button in bootstrap mode.
  Arcadio Bianco
  All
  Jul 22, 2020 @ 12:20pm

How do I change the background color of a button in bootstratp mode? The color will be a parameter received at the init of the form and may vary for each user. In classic mode, it works perfectly, but in bootstrap mode I haven't found a way.

Gravatar is a globally recognized avatar based on your email address. re: Change the backcolor button in bootstrap mode.
  FoxInCloud Support - Thierry N.
  Arcadio Bianco
  Jul 22, 2020 @ 12:30pm

If the 8 standard Bootstrap colors are enough

form.Init()

if thisForm.wlInitFirst
  …
endif

thisForm.wcScriptJSadd(textmerge([jQuery("#<<this.button.wcID>>").addClass("<<iCase(xx, 'btn-success', yy, 'btn-warning', …)>>")]))
Gravatar is a globally recognized avatar based on your email address. re: Change the backcolor button in bootstrap mode.
  Arcadio Bianco
  FoxInCloud Support - Thierry N.
  Jul 22, 2020 @ 12:59pm

I wanted to leave all the colors possible with the user choosing if it this possible of course.

Gravatar is a globally recognized avatar based on your email address. re: Change the backcolor button in bootstrap mode.
  FoxInCloud Support - Thierry N.
  Arcadio Bianco
  Jul 22, 2020 @ 01:23pm

you can use a JavaScript color picker (a little complex for a business user IMHO) and jQuery("#…").css("background-color", whatever)

Gravatar is a globally recognized avatar based on your email address. re: Change the backcolor button in bootstrap mode.
  Arcadio Bianco
  FoxInCloud Support - Thierry N.
  Jul 23, 2020 @ 06:25am

I found a solution based on your tips. Thank you!

© 1996-2024