Connecting the form plugin with the database plugin

I’m trying to find a way to connect my GRAV form to my postgresql database using the database plugin. The goal would be to save the form content to the database. I have all the prerequisites installed, but I don’t really understand to go from there.

Did anyone tried it already ? Do yo have any idea which files should be modified ? I’m a a loss.

I believe you’d nee a custom form action, which would put the data to DB

1 Like

@douxdoux-1312 , Plugin SQLite allows saving a form into a SQLite database using the 'onFormProcessedEvent` and custom form action ‘sql-insert’:

1 Like

Yeah I set up the SqLite plugin first, but I’m more used to Postgresql (especially when it comes to remotely access the db which would be required for the project) !

@douxdoux-1312, I was only showing how a plugin can intercept the ‘Submit’ of a form and processing the custom action.

Both the Database plugin and SQLite plugin contain part of your needs which you can combine into your own plugin.

1 Like

Then say so initially!