Form Block

The Form Block provides a flexible framework for integrating forms into a website, leveraging Contact Form 7 capabilities, along with a content section, where you place the header, subtitle, title and intro. The template dynamically renders different types of forms based on the provided arguments.


Example on the current website

-   Example: View live example

-   Preview with image:

form example image

-   Editor preview:

form acf


Content Editor Fields

Content Section:

  • Header: A concise header for the section.
  • Subtitle: Brief introductory text below the header.
  • Title: Main heading for the form.
  • Intro: Detailed description or explanation of the form's purpose.

Form Type and Configuration:

  • Form Type: Choose between:
    • contact_form: Pre-configured contact form.
    • custom_form: Custom form.

Contact Form 7's Form Details (if applicable):

  • Shortcode: Input the shortcode for the custom form.

Example Usage:

Here is an example of how you can set up a section to highlight a new product.

Steps:

  1. Add the block: Insert the Form Block into your page or post.
  2. Set the content:
    • Contact Title: "Enquire about birthdays"
    • Contact Intro: " "
  3. Choose the form type:
    • Contact Form: To show the pre-configured contact form.
    • Custom Form: To configure a custom Contact Form 7's form.
  4. Configure a custom form (if applicable):
  • Custom Form Shortcode: Input the shortcode for the custom form.
  1. Save the Block: Your Form block is now ready for display!

Conclusion

By providing the necessary content and configurations, this block enables the creation of a flexible and functional form section on your website.