getgrav / getgrav/grav-plugin-form

Columns in contact forms

Open
#535 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
PHP
Stars
64
Forks
80
Avg merge
10h 13m
Merged PRs (30d)
9

Description

This is not a question, but a very simple ready-made solution for creating columns in forms that can be useful to someone.

Result:
![Sailor-Contact](https://user-images.githubusercontent.com/55927622/138428087-17fbb0f3-503d-49bc-9ab8-d9061bf26000.png)

Code:
```
title: Contact
cache_enable: false
form:
name: feedback
fields:
row:
type: fieldset
classes: row
fields:
name:
type: text
label: Name
display_label: false
placeholder: 'Your Name'
classes: form-control
outerclasses: 'col-md-6 form-group mb-3'
validate:
required: true
email:
type: email
label: Email
display_label: false
placeholder: 'Your Email'
classes: form-control
outerclasses: 'col-md-6 form-group mb-3'
validate:
required: true
message:
type: textarea
rows: 5
label: Message
display_label: false
placeholder: 'Your Message'
classes: form-control
outerclasses: 'form-group mb-3'
validate:
required: true
buttons:
submit:
type: submit
value: 'Send Message'
outerclasses: 'form-group text-center'
process:
email:
reply_to: '{{ form.value.email | e }}'
subject: 'Feedback from {{ form.value.name | e }}'
reset: true
message: 'Thank you for your feedback!'
```

This example uses the Bootstrap CSS library, but you can replace it with any other CSS library by modifying the classes accordingly.

Alex Geshov.

Contributor guide

No contributing guide indexed for this repository

Research direction

No file, test, or documentation entry point is named. Start by reviewing the contact-form YAML example and the repository documentation structure; done would mean a maintainer-approved location and wording for this example are identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
bootstrap
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.