GithubHelp home page GithubHelp logo

A catchable fatal error... about boltforms HOT 5 CLOSED

bolt avatar bolt commented on June 2, 2024
A catchable fatal error...

from boltforms.

Comments (5)

GwendolenLynch avatar GwendolenLynch commented on June 2, 2024

On that page, if you (temporarily) change:

{{ boltforms('foo') }}

To:

{#{ boltforms('foo') }#}

Does the error still occur? Also, what is the form config, and are you using a custom Twig template for the form itself?

I am guessing this might just be a typo somewhere, but we need to narrow it down first.

from boltforms.

peterboorsma avatar peterboorsma commented on June 2, 2024

The error did not occur with {#{ boltforms('contact') }#}

By the way: trying to get a working files path is always confusing, in this case for the files uploads.

My config file:

# Global templates used for rendering forms and emails.
templates:
  form: boltforms_form.twig
  email: boltforms_email.twig
  subject: boltforms_email_subject.twig
  files: boltforms_file_browser.twig

# reCAPTCHa set up
recaptcha:
  enabled: false
  label: "Please enter the reCaptcha text to prove you're a human"
  public_key: ''
  private_key: ''
  error_message: "The CAPTCHA wasn't entered correctly. Please try again."
  theme: clean

csrf: true

uploads:
  enabled: false                                 # The global on/off switch for upload handling
  base_directory: /x/x.nl/private_html/x/files/uploads_sollicitanten/ # Outside web root and writable by the web server's user
  filename_handling: suffix                      # Can be either "prefix", "suffix", or "keep"
  management_controller: true                   # Enable a controller to handle browsing and downloading of uploaded files

  enabled: true
  address: [email protected]

contact:
  notification:
    enabled: true
    debug: false
    subject: Your message was submitted
    from_name: name               # A field name, specified in the fields: section below
    from_email: email             # A field name, specified in the fields: section below
    replyto_name: name            # A field name, specified in the fields: section below
    replyto_email: email          # A field name, specified in the fields: section below
    to_name: My Site              # Must be valid text
    to_email: [email protected] # Must be valid email address
    cc_name: Info Person
    cc_email: [email protected]
    bcc_name: Manager Person
    bcc_email: [email protected]
    attach_files: true
  feedback:
    success: Message submission sucessful
    error: There are errors in the form, please fix before trying to resubmit
#  database:
#    contenttype: mycontenttype  # ContentType record to create
#    table: bolt_secret_table    # Specific database table to write to
  fields:
    name:
      type: text
      options:
        required: true
        label: Name
        attr:
          placeholder: Your name...
        constraints: [ NotBlank, {Length: {'min': 3}} ]
    email:
      type: email
      options:
        required: true
        label: Email address
        attr:
          placeholder: Your email...
        constraints: [ NotBlank, Email ]
    message:
      type: textarea
      options:
        required: true
        label: Your message
        attr:
          placeholder: Your message...
          class: myclass
    needreply:
      type: choice
      options:
        required: false
        label: Do you want us to contact you back?
        choices: [ Yes, No ]
        multiple: false
    upload:
      type: file
      options:
        required: false
        label: Picture of your pet that you want us to add to our site
submit:
      type: submit

from boltforms.

GwendolenLynch avatar GwendolenLynch commented on June 2, 2024

Got it with a copy/pasta… It is indentation…

        label: Picture of your pet that you want us to add to our site
submit:
      type: submit

Should be

        label: Picture of your pet that you want us to add to our site
    submit:
      type: submit

from boltforms.

peterboorsma avatar peterboorsma commented on June 2, 2024

sigh Stupid.

Thanks Gawain.

from boltforms.

GwendolenLynch avatar GwendolenLynch commented on June 2, 2024

Looks exactly like the sort of mistake I am really good at making 😁

from boltforms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.