I have a fintech app focused to trading... In each trade, the user can add tags (trigger, mistakes,etc).
So in my trade details page i have a tagify input for each tag that the user can choose for the trade.
My database right now has a table for each tag (trigger, mistake, etc), and then i have a table for trades with a reference element in it refering to each tag. (I don't know if this is the correct way to do it)
I've tried to add the tags to my trade this way:
In my trade table i've created a reference element refering to the trigger table
I've created a Tagify element in my trade detail page (already searching all triggers in this case), inside a form with an unvisual input to know the trade id. PS: This form and this inputs are the ones in the API Connection
I've also converted this form to server connect and added my action (add_trigger_to_trade)
So you don't have a submit button on your form, but want to submit it on selecting a tag in tagify - is that correct?
If yes, then please explain what is the problem - are there any errors in the dev tools > network when submitting the form?
Yes, that's right. I need the tags to be saved (or removed) in that trade database. (I didn't thought about the remove process until now, do you have any sugestion?)
I don't have an error, but the field in my database is still empty after this.
You should be using the change event, not dmx-on:input=""
Please get the files from following zip and place them in the dmxAppConnect/dmxTagify folder, and make sure to upload them to your server: dmxTagify.zip (10.1 KB)
We found a little issue with the onchange event that is now fixed.
Your tagify code should become:
I've done what you said... I've downloaded the files on your zip and put them in dmxTagify folder. I've replaced the code to the one that you sent me and now it appears two errors on devtools.
Please check the article i sent. It's explained step by step where exactly to click and how to check the exact error returned by your server action. We need the error to be able to tell you what is wrong.
What type of column are you trying to insert the data into?
Please make sure it's the correct data type as explained in the first couple of screenshots here:
It wasn't Json as you explained in the tutorial, however i changed it to Json (array) and the error doesn't persist. But i still don't see any trigger in my trade database... Should i change to object instead of array?
PS: I saw now that i am full of errors on my console, maybe i can't see them in my database because of that... I've seen in community that we should wait till wappler correct this errors, is that right?