Skip to content

Show form inputfields according to GET parameter #316

@Toutouwai

Description

@Toutouwai

Short description of the enhancement

There's a handy feature in ProcessPageEdit where you can specify the fields to show in a GET parameter, e.g. /processwire/page/edit/?id=1318&fields=1,114
In that example the only fields shown in the Page Edit form are those with the field IDs 1 and 114.

I'm wondering if this functionality could be broadened so that it becomes a feature of the forms API rather than only ProcessPageEdit. I think it would be quite useful to be able to create links (particularly for modal windows) where only some fields from a form are rendered, so that it's very clear to the user which are the relevant fields to edit.

So a URL might look like: /processwire/setup/field/edit?id=117&show=Inputfield_minlength,Inputfield_maxlength

When some inputfield IDs (or names) are specified in the show parameter then other fields would not be rendered, or would be rendered but hidden with CSS. In either case I'm thinking that InputfieldHidden fields would always be rendered because these may contain values that are expected to be present in the form submission.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions