Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×

[FR] Sélection à value pultiple

1537968379

Edited 1537968414
Bonjour, bonsoir, J'aimerai savoir s'il existe un moyen d'attribué plusieurs "value" en HTML, je m'explique un peu mieux: je souhaite créer une simple sélection qui ressemble à ça: <SELECT name="attr_test">     <OPTION Value="1" selected>Choix 1</OPTION>     <OPTION Value="2" selected>Choix 2</OPTION> </SELECT> Jusque là très classique, et je souhaite faire appel à cette "value" via un <INPUT>. Donc j'ai créer cet Input (je l'ai "disabled" pour éviter que les joueurs face l'erreur de supprimer le texte) <INPUT type="text" name="attr_testappel" value=@{test} disabled></INPUT> Bon alors jusque là tout fonctionne parfaitement, mais j'aimerai attribuer une "value" supplémentaire au choix 1 et/ou 2 afin de créer un autre input qui affichera un résultat différent de la première (en simultané) J’espère être bien claire sur mon intention (sachant que je n'utilise que le HTML et un peu le CSS) en attente de vos réponses
1537984706

Edited 1537984713
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Tout d'abord, je m'excuse, je ne parle pas français et j'utilise Google Translate pour cela. Je vais mettre la version anglaise de ceci ci-dessous. Cela est possible mais nécessite l'utilisation de JavaScript spécialisé pour les feuilles de caractères. Je ne sais pas trop ce que vous aimeriez faire. Voulez-vous 1) avoir testappel la valeur de test concaténé avec du texte statique ou la valeur d'un autre attribut, ou 2) voulez-vous avoir un autre attribut (par exemple test_appel_2) dont la valeur dépend de la sélection dans test, mais est non seulement égal à la valeur du test? Si tout va bien la traduction arrive, et j'espère que cela commencera à être utile, Scott First of all, I apologize I do not speak french and so I'm using Google translate for this. I'll put the english version of this down below.  This is possible but requires the use of specialized javascript for character sheets. I am a little unclear about what it is that you would like to do though. Do you want to 1) have testappel be the value of test concatenated with static text or the value of another attribute, or 2) do you want to have another attribute (say test_appel_2) not just equal to the value of test? Hopefully the translation comes through, and I hope this will be helpful, Scott
1538033841

Edited 1538033981
Bonjour, je vous remercie de m'aider (je vais également utiliser google translate) Le choix "2)" correspond à ce que je recherche, ça donnerai un résultat théorique similaire à: <SELECT name="attr_test">     <OPTION Value="1" SecondeValue="a" selected>Choix 1</OPTION>     <OPTION Value="2" SecondeValue="b">Choix 2</OPTION> </SELECT> <INPUT type="text" name="attr_testappel" value=@{test} disabled></INPUT> <INPUT type="text" name="attr_testappel2" value=@{SecondeValue} disabled></INPUT> Hello, thank you for helping me (I will also use google translate) The choice "2)" corresponds to what I'm looking for, it will give a theoretical result similar to: <SELECT name="attr_test">      <OPTION Value="1" SecondValue="a" selected> Choice 1 </OPTION>      <OPTION Value="2" SecondValue="b"> Choice 2 </OPTION> </SELECT> <INPUT type="text" name="attr_testappel" value=@{test} disabled> </ INPUT> <INPUT type="text" name="attr_testappel2" value=@{SecondeValue} disabled> </ INPUT>