Giter Club home page Giter Club logo

simpleforms's People

Contributors

beholdr avatar bobdenotter avatar evertalbers avatar gwendolenlynch avatar jadwigo avatar jkaan avatar phillippohlandt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

simpleforms's Issues

Twig_Error_Runtime caused by check for field data and E_ALL

I'm quiet new to Bolt and tried this nice extension and immediately run into trouble on my first try to output the predefined "contact" form in my template file. My development config is set up with debug_error_level 30719 and line 146 in Extension.php:

        if (is_array($field['data'])) {

will crash the page, but not when changed to:

        if (isset($field['data']) && is_array($field['data'])) {

An exception has been thrown during the rendering of a template ("Undefined variable: formconfig")

With enabled E_STRICT in PHP config file, get exception mentioned in #11. Fixing this issue and rendering demo form from extension supplied config, get the next one:
An exception has been thrown during the rendering of a template ("Undefined variable: formconfig")
This problem related to file https://github.com/jadwigo/SimpleForms/blob/master/Extension.php#L231.
Changing to $this->config[...] instead of $formconfig fixes the problem.
Note that mime_types_message key should be uncommented in extension config to prevent no key notice.

choice type in the email submitted shows 0 value in the first array

Here is the field options in my form i have on my config file

charges:
      type: choice
      expanded: true
      required: true
      multiple: true
      label: Check all the services you would like to include in your support package:
      choices: [Monthly, Per-hour, Pay As You Go, One Time Consultation]
      required: true

then i tested by submitting the form with monthly and one time consultation selected and i got the email and the email listed the first option as 0 as below

charges: 0, One Time Consultation

any idea what happened?

redirect_on_ok

It seems the function simpleredirect() doesn't work, when I try to redirect the page Bolt throws me an error that says this function doesn't exist.

captura de pantalla 2014-12-23 a la s 17 23 02

I also tryed the simpleredirect function imported from Bolt\Librarybut this does not work either.

Anyone knows the reason of this?

field type 'file' not saving / attaching

Hi there,

I've been playing around with the 'file' field type.
It doesn't seem to save to the designated location. Tried absolute paths, relative paths, root folders, /files/ folders... nothing seems to work.
It's also not being sent over along with the e-mail.

storage_location: files/simpleforms_uploads
attach_files: true

Hope you can help.

Integrity constraint violation: 1048 Column 'fieldname' cannot be null

Form content is not being stored in db if fields are left blank. Even if field is required: false .

I added value: leeg to the fields ('leeg' means empty). Some fields are filled with 'leeg' and others still 'null'.

See error below:

An exception occurred while executing 'INSERT INTO bolt_menukaartitems (slug, name, email, company, contactemail, contactphone, title, productdesc, productrequirments, productdimensions, productweight, productmaterials, productspecs, productstorage, producttransport, producttransport2, productrentperiod, productcostsperiode, productpersonnelamount, productpersonnel, productpersonnelfunction, productpersonnelcosts, upload) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["watt-nox", "Peter", "[email protected]", "Name", "[email protected]", "0000000000", "test5", "adasdv dfv sdcx", "asfvs sdvsd c", "leeg", "leeg", null, null, "leeg", "leeg", null, "leeg", "leeg", null, null, null, "leeg", "No file uploaded"]:

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'productmaterials' cannot be null"""

Add class to input control

Hello!

Thanks for the extension, but I did encounter an issue. I'm trying to add Bootstrap to one of the themes I'm using and I do not see a way to add a specific class to the input controls without overriding the templates.
In the docs, the 'class' attribute is said to be used to style the form elements, but in the templates the attribute it is being used to style the container for the input control and the associated label.
Am I missing something?

Thanks,
Denis Rendler

use one of the field as email subject

Is it possible to use one of the field as email subject, the field can be just a drop down options or text field. right now using mail_subject: doesn't give me any options to vary email subject.

Duplicate mails

So I stumbeld upon the following weird behaviour.

Situation: I have a resource contenttype included in a template with a record.
{% setcontent form = '/resource/content-with-the-form' %}
{{ form.body }}
{{ record.body }}

In the /resource/content-with-the-form I have a field body, which is allowtwig: true
and it contains:
Some text
{{ simpleform('video') }}

Now somehow the simpleform is called twice on one post request, which results in the simpleform being sent twice, but only rendered once. Of course we only want one e-mail.

The temporary fix is to not include simpleform in a external record like this, otherwise no clue how to fix.

Paging @sbani, because he had a similar problem.

Is there a way to use an AJAX call with SimpleForms?

I'm using a popup modal to display the form, but after I press submit, the page refreshes and the modal containing the form will disappear. I have to open the modal again on the refreshed page to see if there were submission errors or confirmation of success. Is there a proper way in SimpleForms to implement an AJAX call to avoid the refresh?

Much thanks! :)

simpleform twig tag breaks ajax calls

Bolt Version: 2.2.14
SimpleForms Version 2.0

Including the simpleform twig tag into my layout.twig breaks all ajax calls on the page.

{"error":{"type":"Twig_Error_Syntax","message":"Unknown \"simpleform\" function in \"layout.twig\" at line 96.","file":"\/Web\/bolt\/vendor\/twig\/twig\/lib\/Twig\/ExpressionParser.php","line":573}}

Any ideas?

Override Recipient(s) via Twig

I didn't immediately see a way to override recipients via Twig using your extension, and ended up writing my own so I could do this:

{{ myform(form_name, to) }}

I needed to do it this way because I wanted the recipient email address to be configurable through a value in the CMS/database, and not config files.

So, is there a way to override the recipients of emails through the Twig function? If not, could something like this be easily added?

Contact form doesn't work and gives me an error

I have installed version 1.0 of SimpleForms with Bolt 2.1.5. I can edit the config file and make the form visible on the contact page. But the form gives an error when I want to send email (see screenshot). I haven't edit the default config file of Bolt (mailoptions). On an other Bolt install I also use SimpleForms and that works fine without mailoptions. What am I doing wrong?

screenshot

Radio buttons

Hello,

How do I get radio buttons? I have this code but I keep getting a dropdown box:
cash:
label: Cash Buyer
type: choice
expanded: true
required: true
multiple: false
choices: [yes,no]

Thanks!

Simple forms with bolt.cm

Hi, as composer.json sais this extension is not available with bolt.cm
Is that because some incompatibility with bolt 3.x or is it just this extension has not been updated to the new extension format?

use_as / use_with does not work

As far as I know there is no way to send an confirmation e-mail. But there is a way to send a copy of the form to the sender of the address with use_ass and use_with. But this does not work. I get no message in my inbox that I used as the sending party of the form. I only receive an e-mail in my inbox that is set as te recipient.

contact:
    mail_subject: "site | Mail"
      recipient:
        type: email
        use_as: to_email|from_email|cc_email|bcc_email
        use_with: email
      recipient_email: [email protected]
     recipient_name: Name
      testing:
        type: text
        label: testing
      fields:
        name:
          type: text
          required: true
          label: Naam
          placeholder: Je naam ..
         email:
          type: email
          label: E-mailadres
          required: true
          placeholder: Je e-mailadres ..
        message:
          type: textarea
          label: Bericht
          required: true
          placeholder: Je bericht ..
      button_text: Versturen

$this->app['log'] is deprecated

Hello, i use your sympathic extension, but there's a little deprecated use ;)

DEPRECATED]: Previous message logged using deprecated log service: extensions/vendor/bolt/simpleforms/Extension.php::783

i'm on bolt 2.2.5 (use debian)

License

Hello! Thanks for your great work, whats is the license?

inline CSS or adding tags

Great extension for a great CMS.

Thank you to the developers.
I wanted to add some other html or more div tags inside the

with the field's row. Is that possible?

I tried postfix an prefix options of this extension but that is not serving my purpose.

Cannot be installed on bolt-2.0.0-beta5pl4

When trying to install SimpleForms in bolt-2.0.0-beta5pl4 I get this message:

The requested extension version could not be installed. The most likely reason is that the version
requested is not compatible with this version of Bolt.

Add option to configure constraints

Hi,

I would like to add an option to SimpleForms to configure the constraints for every field, so that you can easily customize the default validation messages.

My idea is to do something similar to this:

fieldconstraints:
        notblank:
          message: Please fill in your email address
        length:
          min: 2
          max: 100
          minMessage: Your email address has to be at least {{ limit }} characters long
          maxMessage: Your email address cannot be longer then {{ limit }} characters
        email:
          message: Please give us a valid email address 

If you think this is a useful function, then I would like to add it.

Cheers

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.