Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Choose a value from drop-down list and sumbit

Avatar

Level 1

Hi,

I am completely new in forms and javascrpit so my question is very simple:

I created a drop-down list with names.

I want to press a button and sumbit the pdf doc to the mail of the coresponding name of the drop-down list.

My code

The code has no bugs, but after pressing the button, the pdf is being sended allways to george@company.gr. It behaves as if I declared a constant bb="george@company.gr"

It does not take into consideration the value from the drop-down menu

Could you please help me ?

Regards

1 Accepted Solution

Avatar

Correct answer by
Level 10

There is a second bug in your script, I didn't recognize before.

should be

View solution in original post

4 Replies

Avatar

Level 10

The operator to compare aa ist wrong.

To compare you have to use either "===" oder "!==".


Avatar

Level 1

Hi,

I tried, but it continues to give me the first e-mail ("george@company.gr") even if a select from the dropdown menu the 2nd Value "Nikos"

My modified code:

(Tried also with the alternaite "===")

     By the way, i'm using javascript and not Formcalc

Regards

Avatar

Correct answer by
Level 10

There is a second bug in your script, I didn't recognize before.

should be

Avatar

Level 1

It worked !!

Vielen Dank für die Hilfe !