Hello! I’m looking for some advice regarding Flex Objects.
I want to store Go game data into a Flex Object from the Admin panel.
(Go is a board game, and the game state is represented as a 19×19 two-dimensional array.)
I referred to the following documentation and forum posts:
https://learn.getgrav.org/17/admin-panel/extending#adding-a-custom-field
/forum/forms-blueprints/how-to-create-a-custom-form-field-in-admin-t6195
On the frontend side of the custom field, I have implemented an SVG board and JavaScript logic.
By clicking the SVG, I can dynamically generate the game state as a JavaScript 2D array.
My question is about the correct event to decode this data in a Flex Object.
Currently, my idea is:
- stringify the JavaScript object with JSON.stringify()
- set the result as the value of a hidden input field
- decode it with json_decode() on the PHP side in some event.
What event is recommended in this case?
Or, is there the list of flex objects events?