Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Easiest way to use javascript in an action #66

Closed
rolloclarke opened this issue Oct 24, 2019 · 2 comments
Closed

Easiest way to use javascript in an action #66

rolloclarke opened this issue Oct 24, 2019 · 2 comments

Comments

@rolloclarke
Copy link

Hi! I've raised some GitHub issues about $agent bugs in android (#64, #65). I'm very new to this, but it makes me think people aren't using the agent functionality much. Perhaps I've missed something. A user enters some text, then taps save. What's the easiest way to manipulate that user input with javascript before storing it say with a $global.set action?

I know I can use inline javascript but that seems clunky.

@clsource
Copy link
Contributor

Hello, the best way is to include js using https://jasonelle.com/jasonette-old-docs/actions/#scriptinclude and then call the function using {{myfunction($jason)}} to manipulate the user input :)

@rolloclarke
Copy link
Author

Thanks! (I was missing something). I will try things this way too

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants