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

Form followed by Form

Started by Richard Hainsworth 9 years ago · 0 replies · 719 views
9 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 Vladimir Novak, 2 weeks ago
3 291 2 weeks ago
Plugins · by Mathieu Lecouturier, 3 weeks ago
3 277 3 weeks ago
Plugins · by Slebeig, 2 months ago
1 403 2 months ago
Plugins · by Rene, 2 months ago
2 574 2 months ago
Plugins · by Xavier, 3 months ago
2 490 3 months ago