Hi all,
I want "box1", which is an input field, to combine the dollar sign "$" with whatever number "$w("#slider1").value" is equal to. So it might end up as $200, for example. The code I have right now is:
$w("#box1").value = "$" + $w("#slider1").value;
And as you've guessed, it doesn't work. Does anyone know how to concatenate the two?
bonsoir comment puis-je concaténer deux champs d'une base de donnée de WIX , un champ "prénom" avec un champ 'Nom" pour obtenir"Prénom Nom" ?
Ps/ il est important d'avoir deux champs pour que, dans l'utilisation de cette base de donnée avec "Liste et Grille", les différentes personnes soient classées par ordre alphabétique
Hello how can I concatenate two fields from a WIX database, a "first name" field with a "last name" field to get "first name last name"?
Ps/ it is important to have two fields so that, in the use of this database with "List and Grid", the different persons are classified in alphabetical order.
Remember that the slider value is number, plus you can already set all that in the slider settings through the Wix Editor.
However, if you want to try it through combining values then as the slider value is only number, it will not work.
Slider
Sliders let your users input a number by sliding a handle on a track.
You can define a minimum and maximum value for your slider as well as a default value.
https://support.wix.com/en/article/slider-settings
Connects to Number Field
https://support.wix.com/en/article/working-with-the-connect-slider-panel
You can do it easily through text like this.
getCurrentTemp($w("#textInputCity").value) .then(temp => $w("#textTemp").text = temp + "°");
Basically, you are trying to combine a text and a number field together which won't work as the slider doesn't have a text value as of yet.
Your best and easiest answer is to have the '$' in a text box which is positioned right next to the element that you have the slider value displayed in as per from the Connects to Number Field link above.
It would also be a good idea to group these two elements together so that they both move together if going from desktop to mobile version for example.