WeStandWithUkraine

47 Posts
newbis
1 month ago
4
Topic

Bonjour,

Mon formulaire comporte 3 champs : 2 listes et un texte

Je souhaite conditionner mes listes au contenu du texte.

liste A

Ce champ [#form#] EST REMPLI [-1] QUAND (et) mon_texte EST REMPLI

case 1-2 décochée

cette condition fonctionne sans problème

liste B

La condition de la liste A appliquée à la liste B ne fonctionne pas

Pourquoi, svp ?
Alain

Get a VIP membership
691 Posts
rpoy
1 month ago
3
Level 1

Hi Alain!

Can you give some more details on what you are trying to do?

My guess is that your problem may have something to do with with the index value, if I understand the problem correctly.

Example - if you have a list:

  1. Green
  2. Blue
  3. Red

If you want to set the list, to Red then you need to set the index value to 3.

I have run into similar issues and I know that conditionals can be tricky.

47 Posts
newbis
1 month ago
2
Level 2

Bonjour rpoy, Merci pour ta réponse !
Mes 2 listes sont des Dynamic cascade, la première est choix de catégorie et la deuxième un choix d'activité. Le champ texte est utilisée pour ajouter une nouvelle activité. Quand ce champ texte est saisi, je veux affecter la valeur -1 aux deux listes Dynamic cascade.

?

Je ne comprends pas l'utilisation du code de cet exemple Get Text From Select Dynamic

691 Posts
rpoy
1 month ago
1
Level 3

Hi Alain!

Unfortunately items can not be added to the Select Dynamic Cascade or the Select Dynamic on the fly.  I had a similar situation a while back and ended up creating a content type for the items that I wanted to add (Activity in this case).  Then I added a Button Free which I called Add New item and it opened form to add a value.

But perhaps another way to accomplish this task is to do something like this:

  1. Add hidden text fields that actually store your values.  
  2. Set these fields using the Cascade Dynamic fields (storage none) using onchange conditionals.  
  3. Use a check box for Adding New Values (storage none).  
  4. On the checkbox set conditionals to hide the Cascade fields and show the hidden text fields.  This way the user can add values directly to the fields.

There may be a couple of issues with this method.

When you set the fields with the Cascade Dynamic, I think it copies the index instead of the text value.  That is where the

Get Text From Select Dynamic is needed.

Also when you go to edit the form, the Cascade Dynamic values will not be set, so you need set them by doing the reverse of the Get Text From Select Dynamic.


Hope that make sense...

Randy

47 Posts
newbis
30 days ago
0
Level 4

Merci Randy,
Je poursuis des tests avec ta dernière proposition.
Meilleurs voeux
Alain

Get a Book for SEBLOD