Forums

Events and buttons

ataylor14 09 Sep, 2015
Hello
1) I have created and event in Setup
2) I want to call this event from a button that is clicked on the form (not submit but a simple button).

How can I do this please?
Thank you
Amelia
GreyHead 09 Sep, 2015
Answer
Hi Amelia,

You can add a link to the button like
http://my_domain.com/index.php?option=com_chronoforms5&chronoform=form_name&event=event_name
Does that do what you need here?

Bob
ataylor14 09 Sep, 2015
Yes what you suggested would work but in this way clicking on the button will submit the form (?) or goes to another page.

What I would like to do is when I click on a button I should stay in the same page. What I am trying to create is the following:
1) Two dropdowns in which the user selects data
2) A button that when clicked the selected data in the dropdowns is combined and added to another dropdown.

I have a javascript that adds an option to a dropdown which works. But I cannot seem to manage to get this function called when I click on a button. When I put this function inside an 'click' event for the button - nothing happens. I tried domready, document ready but no success.
Is it as if the button does not see the other elements on the form. Am I being a bit silly in what I am trying to do?
Thank you for your help.
ataylor14 10 Sep, 2015
Hello Bob

ignore my question above. I think that moral of the story is: js is an interpreted language. So if I call a dropdown from a button then that dropdown should 'appear' before the button on the form.
Amelia
This topic is locked and no more replies can be posted.