Injecting API response into jS script
Hi there , I 'm setting up a payment integration for our app , which requires API responses from a backend SDK we have hosted on AWS lambda . Upon a button click , I 've tried to set the API responses as variables , and piece the variables together by concatenating the varibles with pieces of the script , and then injecting it into a script tag . For some reason this flow doesn 't work , but when I just insert the scripts manually with the API responses they do work , thus I 'm led to believe I 'm doing something wrong in terms of injecting the API response into my jS function . Any ideas ? β 1So it is incomplete Nice , what was your fix ? Get API responses as variables , pass to custom action as arguments It 's logging everything in the console , but for some reason it 's not triggering the test alert I have set up . Do you have an idea where I may be going wrong ? Are you seeing the form initialize successfully ? Yep , form is initializing and functional , just the events I can seem to figure out for some reason . I don 't see an event listener or anything So , I 'd need an event listener , to be able to trigger the events in the toddle editor ? But for some reason ctx .triggerActionEvent is not triggering ? Does it show if you use the built in console log action Can you use the console log action or set a simple span with the variable to check it instead Maybe some of the 14 versions i wrote before , actually worked lol . Yes , likely actually More or less how I solved my first problem earlier today If native actions can βt do it You get a lot more control when using them