<p>we ran into the same problem. If you remove "admin" on line 12 of /plugins/formbuilder/resources/js/formbuilder-form.js it works.</p>

<pre>url = '/actions/' + $(this).children('[name=action]').attr('value');</pre>

<p>We couldn't figure out why the path leads to something which is only accessible with admin-rights.</p>

CC BY-SA 3.0
2015-09-07T14:58:37.543Z
2015-09-07T14:58:37.543Z
user4020
<p>Today I wanted to add a contact form to my webpage, and I chose the Form Builder plugin for its ease of use. So far all went well, and I managed to display the form in the page (not that difficult), but when testing the form I got an undefined error.</p>

<p>As of now I have no idea what is undefined. I checked the code, the fields I use (they are all Form Builder fields, the email and the plain text), and I checked the settings of Form Builder.</p>

<p>Can you guys help me out?</p>

<p>The link to my website: www.evinwijninga.com</p>

<p>The code in the template</p>

<pre><code>&lt;!-- CONTACT FORM --&gt;

{% set form = craft.formBuilder.getFormByHandle('contactForm') %}
{% set tabs = form.fieldLayout.getFieldLayout().getTabs() %}
{% set pluginScripts = craft.formBuilder.pluginScripts(form) %}

&lt;div class="grid-100"&gt;
    &lt;h2&gt;How to contact me&lt;/h2&gt;

    &lt;form method="post" accept-charset="utf-8" name="{{ form.handle }}" class="formbuilder-form grid-60 prefix-20 suffix-20 {{ form.handle }}" id="{{ form.handle }}" data-parsley-errors-container=".formbuilder-notification"{% if form.hasFileUploads %} enctype="multipart/form-data" {% endif %}&gt;
        &lt;input type="hidden" name="action" value="formBuilder/entries/saveFormEntry"&gt;
        &lt;input type="hidden" name="formredirect" data-redirect="{{form.successPageRedirect}}" value="{{form.redirectUrl}}"&gt;
        &lt;input type="hidden" name="formHandle" value="{{form.handle}}"&gt;

        {% for tab in tabs %}
        {% set fields = tab.getFields() %}

        &lt;fieldset class="{{loop.index}}"&gt;
            &lt;legend&gt;{{ tab.name }}&lt;/legend&gt;
            {% for field in fields %}
            {% set input = craft.formBuilder.getInputHtml(field) %}
            &lt;div class="grid-100 grid-parent"&gt;{{ input | raw }}&lt;/div&gt;
            {% endfor %} 
        &lt;/fieldset&gt;
        {% endfor %}

        {# Error/Success Messages #}
        {% if craft.session.hasFlash('error') or craft.session.hasFlash('success') %}
        {% if craft.session.hasFlash('error') %}&lt;div class="formbuilder-notification"&gt;&lt;p class="error-message"&gt;{{ craft.session.getFlash('error') | raw }}&lt;p&gt;&lt;/div&gt;{% endif %}
        {% if craft.session.hasFlash('success') %}&lt;div class="formbuilder-notification success"&gt;&lt;p class="success-message"&gt;{{ craft.session.getFlash('success') | raw }}&lt;/p&gt;&lt;/div&gt;{% endif %}
        {% else %}
        &lt;div class="formbuilder-notification"&gt;&lt;/div&gt;
        {% endif %}

        &lt;button type="submit" class="grid-100"&gt;Submit Message&lt;/button&gt;


    &lt;/form&gt;
&lt;/div&gt;
</code></pre>

<p>The fields:</p>

<p><img src="https://i.sstatic.net/0efkD.png" alt="enter image description here"></p>

<p>and the settings in Form Builder</p>

<p><img src="https://i.sstatic.net/xqfvm.png" alt="enter image description here"></p>

<p>This is the latest error entry. The timestamp however is different than the time when I tested the form (which was later):</p>

<p><img src="https://i.sstatic.net/PckSA.png" alt="enter image description here"></p>

CC BY-SA 3.0
2015-07-20T03:48:49.753Z
What's the actual undefined error you're getting?  If you check your `craft/storage/runtime/logs` files, you'll get the error along with the full stack trace.
Brad Bell
CC BY-SA 3.0
2015-07-20T11:05:05.410Z
Hi @BradBell, I added a screen shot of the latest error. However I doubt if that is the right one.
Evin Wijninga
CC BY-SA 3.0
2015-07-20T15:18:20.617Z
Yeah, that's un-related. Better to delete the `craft/storage/runtime/logs` folder, recreate the issue, then look back at the logs again. Will be easier to spot where your issue is, then.
Brad Bell
CC BY-SA 3.0
2015-07-20T18:11:19.540Z
Sadly no error log is written when I recreate the issue @BradBell
Evin Wijninga
<form>
Form Builder plugin returns 'undefined' when I submit
# Form Builder plugin returns 'undefined' when I submit

(Asked by: username_0 on 2015-07-19)

Today I wanted to add a contact form to my webpage, and I chose the Form Builder plugin for its ease of use. So far all went well, and I managed to display the form in the page (not that difficult), but when testing the form I got an undefined error.
As of now I have no idea what is undefined. I checked the code, the fields I use (they are all Form Builder fields, the email and the plain text), and I checked the settings of Form Builder.
Can you guys help me out?
The link to my website: www.evinwijninga.com
The code in the template


{% set form = craft.formBuilder.getFormByHandle('contactForm') %}
{% set tabs = form.fieldLayout.getFieldLayout().getTabs() %}
{% set pluginScripts = craft.formBuilder.pluginScripts(form) %}


    How to contact me

    
        
        
        

        {% for tab in tabs %}
        {% set fields = tab.getFields() %}

        
            {{ tab.name }}
            {% for field in fields %}
            {% set input = craft.formBuilder.getInputHtml(field) %}
            {{ input | raw }}
            {% endfor %} 
        
        {% endfor %}

        {# Error/Success Messages #}
        {% if craft.session.hasFlash('error') or craft.session.hasFlash('success') %}
        {% if craft.session.hasFlash('error') %}{{ craft.session.getFlash('error') | raw }}{% endif %}
        {% if craft.session.hasFlash('success') %}{{ craft.session.getFlash('success') | raw }}{% endif %}
        {% else %}
        
        {% endif %}

        Submit Message


    


The fields:

and the settings in Form Builder

This is the latest error entry. The timestamp however is different than the time when I tested the form (which was later):

**Tags:** form

> **Comments:**
> **username_1**: What's the actual undefined error you're getting?  If you check your `craft/storage/runtime/logs` files, you'll get the error along with the full stack trace.  
> **username_0**: Hi @BradBell, I added a screen shot of the latest error. However I doubt if that is the right one.  
> **username_1**: Yeah, that's un-related. Better to delete the `craft/storage/runtime/logs` folder, recreate the issue, then look back at the logs again. Will be easier to spot where your issue is, then.  
> **username_0**: Sadly no error log is written when I recreate the issue @BradBell  

---

## 1 answers

### Answer by username_2 on 2015-09-07. Score: 2

we ran into the same problem. If you remove "admin" on line 12 of /plugins/formbuilder/resources/js/formbuilder-form.js it works.
url = '/actions/' + $(this).children('[name=action]').attr('value');
We couldn't figure out why the path leads to something which is only accessible with admin-rights.


---

