Module

Developer
Supported

EE 1
EE 2
ProForm Drag and Drop Form Builder

Back to this add-on's main page
View Other Add-ons From Isaac Raway

     

You must be logged in to post.

[Resolved] Conveying entered info from form to notification template

Support (Resolved)

David S
David S

Hi!
I just cant figure this out.

Could you please provide me with an example of how a very simple form based on the full form tag {exp:proform:form}.

A form that just collects a message and an emailadress and loads different template on success.

Yes Im sure everything is in the docs (that I’ve been reading a couple of times by now) but I am simply not smart enough.

/David

airways
# 1
Developer
airways

The basic core thing to grasp with ProForm is that it is designed to allow you to control the HTML of your site without any interference. In order to do this, it’s default tag provides a huge number of options and pieces of data for each field so you can render the HTML exactly how you want to.

Of course ProForm also provides a simple tag which can be used to render a form, but that tag doesn’t currently provide the same number of options as the full form tag. If you need to customize how your form behaves - the full form tag is the correct way to do so.

The best way to understand how ProForm handles form rendering is to read through the three sections of the full form tag’s crash course documentation, which is interleaved in the full form tag’s documentation (look for the Crash Course boxes).

I’ll also outline the steps here:

The form=“form_name” parameter tells the {exp:proform:form} tag what form you want to get fields for. This parameter’s documentation page also contains information on how to use an embed template to make reusing your custom template code a lot easier.

You will also want to use the thank_you_url=“some/url/here” parameter to send them to your custom thank you page.

Once inside the form, you are given a set of rows with fields inside them, represented by the {fieldset} loop: http://metasushi.com/documentation/proform/tags/form.html#var_fieldrows

Inside of the {fieldset} loop, there is a {fields} loop which provides the label, name, and many other settings for each field as they have been set in the form builder.

The form rendering process is shown fully functional in the sample template as well. Combine this with an embed template (or just call the template tag directly if you don’t care about reusing the code), and you’ll be on your way.

airways
# 2
Developer
airways

I have begun working on a couple screenshot heavy tutorials, which may make all of this clearer. They should be available pretty soon, and will hopefully make things a bit clearer for you!

David S
# 3
David S

hm….  I’ll probably need those…
because I am defenitely missing something here. I am clueless on why none of my forms listens to the thank_you_url-parameter.
What should the submit-button-field look like in a full form that does not rely multiple steps?

Thanks for taking time on such noob-issues.

/David

airways
# 4
Developer
airways

With the latest build, 1.05, you shouldn’t need to do anything special with the submit button for a single step form. Previous builds did require use of the new style markup with a special name for the submit button, which looks like this:

<input type=“submit” name=“_pf_finish” value=“Submit” />

Can you paste the template you are using into a reply so I can take a look and see if there might be an issue I can identify?

airways
# 5
Developer
airways

Oh and I don’t mind supporting new users at all! I love helping. :)

David S
# 6
David S

Aah! What a relief!!!! I was so sure (when will I ever learn!) that name=“_pf_finish” was strictly part of a multistep-form so I just switched it for name=“submit”.
1.0.5!? I just downloaded 1.0.2 and had this feeling of being on the cutting edge. I bet 1.07 is out before I manage to hit ‘Submit Post’ right below!

David S
# 7
David S

Ok. Obviously I need further help with some basics:

(and yes I have really tried to educate myself reading the documentation but I keep getting lost all the time. So be gentle! :) )

I dont understand how to present from the form in the notification table. The info turns up nicely in the entrieslist in the controlpanel.

/regards David S, Sweden

{exp:proform:form form="mailform" thank_you_url="thanks"}
{fieldrows}
{fields}
<label for="{field_name}">{field_label}</label>
                <
input name="{field_name}" value="{field_value}" placeholder="{field_placeholder}" type="{field_type}">
{/fields}
{
/fieldrows}
<input type="submit" name="_pf_finish" value="Submit" />
{/exp:proform:form} 
{exp:proform:results form_name="mailform"}
<p>Someone submitted the {form_name} form:</p>
{fieldrows}
{fields}
  
<b>{field_label}</b>: {field_value}<br/>

{/fields}
{
/fieldrows}
{
/exp:proform:results} 
airways
# 8
Developer
airways

Yeah usually there won’t be that many builds in such a short period of time. I was working closely with two projects yesterday who were running into some unique issues so I wanted to get builds out a bit faster than usual. Normally multiple changes would be bundled into a single build.

airways
# 9
Developer
airways

Some definitions might be helpful:

1. The “notification” template is used to render an email which is sent to various addresses, depending on the form’s settings.

2. The “thank_you_url” is a URL that the user is redirected to after submitting the form - they will see this page in their browser. It can be set to a “template_group/template” URL, a Structure URL, or any other URL.

It looks like you are trying to do notification templates - in which case you do not need a thank_you_url parameter on the form tag.


I’ve made a few screenshots that might help explain how notification templates work.

First, you need to create a template group to store your notification templates: (screenshot 1). In my example I am using the name “notifications”.

Second, you need to create a notification template within that group - in my example I am using the name “default”. Note that these templates do NOT use the {exp:proform:results} tag: (screenshot 2)

Third, you need to setup ProForm to use this notification group: (screenshot 3) Be sure to click Submit!

Finally, you set the form to render the template you want: (screenshot 4)

Edit: Fixed link for (screenshot 4).

airways
# 10
Developer
airways

I’ve merged your two threads together since the second was really a continuation of the first.

Please let me know if you were able to resolve this issue with the instructions provided. If not, I will move up the schedule for the screenshot tutorials.

airways
# 11
Developer
airways

Hi, just checking - were you able to resolve this issue with the above info?

airways
# 12
Developer
airways

I’m going to close this thread since there has not been any recent activity. Please post again if you have any additional questions!