Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Form followed by Form

Started by Richard Hainsworth 8 years ago · 0 replies · 580 views
8 years ago

I've developed an sqlite plugin that creates a new form action 'sqlite' and takes form data and puts into a table (eg. people).
The plugin works fine. Except I want to have an intermediate step. So the user sees the form and has two buttons <continue> and <cancel>
If the user clicks on <continue>, then the form is processed again with the data being sent to the database.
I cannot figure out how to get the extra step.
I have tried putting an intermediate process, eg.

YAML
form:
  name: xx
  fields:
    -name: ff
     type: text
 buttons:
   -submit
     type: submit
  process:
    - sqlite
        table: people
    - sqliteConfirm

This works except it executes immediately, that is, the data from one step is not passed to the next process.

I've tried a couple of different ways, but can't find an approach that works.

Any suggestions?

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Rene, 1 week ago
2 46 1 week ago
Plugins · by Xavier, 4 weeks ago
2 55 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1181 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 49 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 73 2 months ago