Use user input in javascript action

0
Is it possible to use attributes filled in by the user in javascript? I have an app where you can make appointments and I want to make a script that generates an ics file for said appointment. But for that I need to be able to get the time, date and location into the script. Is this possible? Maybe with Java?
asked
2 answers
0

Why do you want to do that via javascript? You can simply create a form in Mendix, take user inputs via that form and upon Submit/Save of that form you can have a microflow with custom java actions which can generate your ics file.


 

answered
0

You may find solution with the mendix client : https://apidocs.rnd.mendix.com/9/client/

 

Another simpler method would be to take the value that you want from the screen.

If the value in already in the current screen you just have to take it. in jquery it will look like that :

$(‘.classname’).text();

 

If the value is not in the screen and you have to put it in the screen and put the display to none (will be invisible in the page, but the js script will still be able to take it).

 

Keep in mind that you may have to put a setTimeout in your script to be sure your data is loaded before the script.

 

answered