Skip to content

Arrays #63

Description

@dgp1130

Need some way of representing multiple inputs and subforms which are repeated. This would handle the use case of asking the user for a list of cars, previous employments, children, etc.

My proposal would be to look something like:

<!-- Mark each input with the same name -->
<input type="text" name="foo" />
<input type="text" name="foo" />
...
<input type="text" name="foo" />
string[]: foo; // Declare as a string

// Form is valid when all foo's are valid
valid: all foo.valid;

// Each foo is valid when it is filled
foo {
    valid: this matches @filled;
}

This example only really makes sense for primitive types. We might need to use some kind of custom types (mentioned in #50) to implement actual subforms as a list.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions