Skip to content

Get next step from form data #25

@smohadjer

Description

@smohadjer

I don't like this line:

$nextStep = 'form.php?step=' . ($step + 1);

Imagine you have a form with ten steps and then you want to add a step between 2nd and 3rd. The easiest way would be to call it step 2.5, otherwise if you want to call it step 3 it means you have to rename all existing steps and form action inside them and other things that depend on step number, incrementing them all by one. Lots of work with possibility of breaking things. Why don't we simply get the next step a form should direct to from a hidden field inside that step? Wouldn't it make steps more modular and changes easier?

<input type="hidden" name="nextstep" value="3" />

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions