Skip to content

Feature: chaining form actions #223

Description

@dregad

After playing around with the script action introduced in the 2017-07-27 release, I thought it would be nice if I could combine the power of the fully custom handlers that it allows, while leveraging the existing, standard functionality provided by the template action.

In other words, I would like to be able to "chain" form actions, i.e. first call a script to pre-process the submitted data, then use template to create a page with modified data.

My use case is that I need to perform manipulation on a user-submitted date, to create a new page in a namespace derived from the date's year, based on a school calendar (August -> July), so 2017-10-13 goes in 2017:2017-10-13, whereas 2017-05-31 should be stored in 2016:2017-5-31)

Unfortunately the plugin currently does not allow this, but it would be quite simple to enable it: passing the $fields parameter by reference, and making the setVal() method public.

Would you guys consider this ? I can submit a pull request if you think this would be a useful feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions