6

To answer your questions in regards to how they will fit with Freeform... If what you mean by pre-populating fields with existing data is being able to fill fields with data from other elements, Freeform can do this. It allows you to populate fields with data from other Craft Elements or even common Predefined data included with Freeform such as States, ...


5

Have you tried using the {{ craft.request.url }} variable in your returnUrl setting? Also you should be able to format it like so: returnUrl: craft.request.url ~ "?success" More details about the craft.request model can be found here: https://craftcms.com/docs/templating/craft.request


5

Unfortunately, the vanilla {% cache %} tag doesn't have a way to escape or ignore certain content. The obvious workaround is to have more than one {% cache %} tag, where the content that shouldn't be cached sits between/outside those tags. If you can't do that, another option is to use output buffering and injection. Basically, you cache whatever you need ...


5

You can add a param to your returnUrl in the form composer then check the template for the param. For example: You redirect to /contact?success {% set successParam = craft.request.getParam('success') %} {% if successParam is not null %} <p>Hooray! Success!!</p> {% endif %} Another option is to Ajax submit your form and just have a modal or ...


4

This is probably injected as part of the form template that's used to render the form. In the Freeform section of the CP, if you edit a form and choose the 'cog' icon in the right-hand pane to access the form settings, you'll see a dropdown labelled 'Formatting Template', which lets you choose a template to render out the form markup, with a number of ...


3

From the Freeform docs: The Freeform Form (or Submissions) fieldtype lets the user assign any Freeform form (or form submissions) to any element: a section entry, categories, assets, etc. In a nutshell, this means you can embed forms to any entries you have, like so: This section within the docs shows you how to correctly code your templates.


3

The issue is you don't have a variable named input. I changed the code a little by included a variable named value. To make sure the proper option is selected you would need to pass back to the template a url param name with the currently selected option value. If there is a param and it has a value it will add that value to the variable value if not value ...


3

I work with Sprout and can answer your questions with regards to Sprout Forms. 1. It should be possible to prepopulate fields with existing data This will happen by default in a lot of standard use cases when you are using Form Templates and when validation fails, for example. It's also possible to populate a Form Entry dynamically using the setEntry ...


3

There is an entire section here that discusses API integrations, including the ones that come with Freeform. http://docs.solspace.com/craft/freeform/v2/


3

You can render the fields by your own and use the twig translate filter and do it with translation files. But I think there is no way to do it via the CP currently.


3

Based on your goal, I don't recommend taking this approach for the technical debt reasons in my comment, however your actual question is still a valid one. You can call any controller's method from a plugin/module like this: Craft::$app->runAction('users/save-user');


2

By setting the action: "#errortag" seems to stop the form submitting if there are no errors. So instead I have added the following code and this seems to work; {% if form.hasErrors %} {% includejs %} $(document).ready(function () { $('html, body').animate({ scrollTop: $('#formErrors').offset().top-110 }, 1000); }); {% endincludejs %} {% ...


2

I was able to find a solution. It's probably not the best way to go, but it works. In the form add a new action: <input type="hidden" name="action" value="freeform/submissions/save"> which will override the standard action. It's the same form action Freeform uses to save entries in the CP. Then add the id you want to update as value=. For example: ...


2

This still appears to be an issue with checkboxes on Freeform Craft 1.6.2. The mailing list checkbox is repopulating as expected but the checkbox field is not repopulating in a multi-step form after submitting and going back. All fields have a value of 1.


2

I don't think this has anything to do with your code, and actually appears to be a bug in Freeform itself, where the Submission object and email notifications are showing the value as whatever the default is set to. I've made a note about this issue and we'll have it corrected shortly. :)


2

It looks like according to your code this (and Aran's) solution should work except for one small difference... if you are testing for this: entry.title ~ category.title The value parameter (what is getting stored in the database) should match by removing the space, so from this: {{ entry.title }} {{ category.entryAlternativeTitle }} To this: {{ entry....


2

Not likely to be an issue for anyone in the future but just incase someone is looking at this... Turns out Freeform should be able to handle underscores in field handles. Just an oversight on the Solspace side and they're going to be patching in support for underscores shortly.


2

The recipientsEmail field should be an Email fieldtype, and in Composer you need to set the notification template in the Field Property Editor column (on right) for that field and it'll send an email to the email that is entered in that field when the form is submitted. :) View the documentation page here for more information about email notification ...


2

That isn't possible right now, the things you can pass to the render tag are listed here under customAttributes. We might, however, add such functionality in the future.


2

Freeform includes mail list integration for MailChimp, Constant Contact (pro only) and Campaign Monitor (pro only). As per their documentation, form fields can be mapped to your mail list. You can include a checkbox so visitors can choose to subscribe when submitting a form. If they do tick the checkbox, they will be sent a double opt in email (if this is ...


2

Add the mailing list "field" in the form you want by dragging it from the left sidebar to the form. Click on the field when it's added. In the right sidebar, change the dropdown field "Mailing Lists" to the list you want.


2

We've recently discovered that this feature is not always reliable unfortunately. However, we're working on addressing this and coming up with a better solution in the coming weeks. Sorry for any inconvenience.


2

That error means that your Craft installation is choking on one of Craft's Composer dependencies that is using newer PHP 7.1 syntax and your current box is using PHP 7.0.x. Usually when that happens, someone did a Composer install/update locally using a newer version of PHP than what you have on then box you're getting the error on, then deployed the ...


2

There appears to be 2 errors in your code. name="uploadPhotos.handle[]" should be name="uploadPhotos[]", assuming your field name is uploadPhotos. The handle part is unnecessary, unless you were using it like name="{{ uploadPhotos.handle }}[]", but it's redundant since you already are calling the handle to get the handle (but makes more sense when you're ...


2

FreeForm actually has a Dynamic Recipients field that sounds like it will do what you're wanting. I believe you can choose to have it displayed as a select field, radio buttons, or checkboxes. Alternatively, you could probably create a little custom Twig and set up dynamic template notifications. I would think you should be able to switch the recipient ...


2

Or I could actually read all the documentation: Method getRows() As in {% for row in page.getRows() %}


2

You'll need to update to Freeform 3.6+ (Craft 3.4+), which contains a compatibility fix for this issue. :) https://docs.solspace.com/craft/freeform/v3/setup/changelog.html#_3-6-0-2020-01-23


2

Solution for Freeform 3: Preventing duplicated field id: Set a custom field id prefix. Using the form handle might be a good id, as long as you're not using the same form twice on the same page. Preventing duplicated form id: Manually adjust the form id parameter to something unique.


2

It’s potentially possible with a custom module, but it would be far less effort (not to mention, more secure) to just apply the solspace form classes to the regular log in form.


2

Is this a terrible idea? Is there a better way to accomplish this? One thing that makes a great designer/developer is knowing when to say no. It could be done but it's probably not worth it. If you need to ask the question, sometimes you just need to validate your own thoughts. At the expense of not answering your other questions, I'd say Freeform is great ...


Only top voted, non community-wiki answers of a minimum length are eligible