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


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

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

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

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

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 ...


1

Thanks for reporting this issue. We'll have a fix available for this in the next release of Freeform. :) In the meantime, affected customers can contact us for a patched copy.


1

One way you could do this is on the backend via a module and the FreeForm events: Run composer require ramsey/uuid in the root directory of your project Add the following lines to the top of modules/Module.php right after the line that says use Craft; use yii\base\Event; use GuzzleHttp\Client; use Ramsey\Uuid\Uuid; use Solspace\Freeform\Services\...


1

To pull an individual field from a form, use the form.get("myFieldHandle") method. Simple example using the field.render() method: {% set form = craft.freeform.form("myFormHandle") %} {{ form.get("firstName").render() }} Or a more custom example: {% set form = craft.freeform.form("myFormHandle") %} {% set firstName = form.get("firstName") %} <label&...


1

Not sure if it's a good call or not but you could have an endpoint that just has the {{ craft.app.request.csrfToken }} outputting on it. Poll(GET) that using ajax (axios or whatever you're using in your Vue app) and update your Vue model's csrf value with the response body? Same for the honeypot value I guess although I'm not that familiar with freeform I ...


1

Did you set up a route and assign a template to it? contact/success/{{ number }}


1

It would be fairly easy to create a hidden field and read the page URL into it. As for the title, is your form an embed inside the channel entries call? Then it's pretty easy to get the title as well. If not you may have to be a bit creative. Check the hidden field config, it even tells you how to pull in the current url.


1

Solution: Instead of using the Craft updater, execute a composer require composer require solspace/craft3-freeform-pro


1

Trying to understand the issue in general. These are my thoughts, not sure if they will help you. I assume that by caching, you mean some sort of full page cache and the comments below are based on that. AJAX requests to support CSRF in craft, require the tokens name/value passed as a param in the request data. In general, if you introduce a full page ...


1

You can pass values from other Craft elements or from URL segments, etc to your Freeform forms. Specifically when using with the Element fieldtype, when wanting to override the return URL, you can do something like this: {{ form.renderTag({ returnUrl: entry.thankyouUrl }) }} When wanting to override Freeform field data values or options, you can do ...


1

You could also add andWhere to your query. Look to the table 'freeform_fields' for the field who you want to use for the query end remember the id of the field. In the table 'freeform_submissions' look to the field names an look to field_[rememberd_id] field__21 is in my case a hidden field for an entryId to show all submissions related to an entry. for ...


1

Looks like there's a Craft 2 plugin that exposes PHP's array_unique method to Twig. So to continue on the example you linked to, it would be something like this with that plugin installed: {# Initiate the hash in which we'll store matching submissions. #} {% set matchingSubmissions = [] %} {# Loop through all submissions, checking if the specified ...


1

But on my remote server it deleted two thirds of the tables in the db. That sounds like some update failure happened, Craft tried to roll-back and restore the database from its pre-update attempt database backup because https://docs.craftcms.com/v2/config-settings.html#restoreDbOnUpdateFailure is set to true, then plot twist another failure happened before ...


1

Email that is sent from your server is often marked as spam, this is not anything to do with either Craft or Freeform but with the fact that the server you use may not be trusted by email providers. Read the article Brad recommended for some background info. Then do yourself a favour and use a transactional email service to deal with all the hassle for you, ...


1

Here is the workaround I've resorted to using in the meantime. {# Initiate the hash in which we'll store matching submissions. #} {% set matchingSubmissions = [] %} {# Loop through all submissions, checking if the specified field matches the desired value. #} {% for submission in submissions if submission.fieldWithValue == '123' %} {# If the ...


1

Unfortunately this currently isn't possible. However, we've added it to the feature requests list and will revisit adding this in the not-too-distant future. :)


1

This might not work, but you can try it like so: {% set submissionCount = craft.freeform.submissions({ form: 'myAmazingForm', fieldWithValue: '123', }).count() %}


1

Using the Craft Element or Predefined Data feature in Freeform, you can easily setup options (from Craft Entries, States, Number ranges, etc) for when you're creating additional fields. If you're referring to custom data, if you've created the field through Freeform -> Fields manager area with the options, you can also duplicate fields from there.


1

Not manually but you can search for the field in your database. If the plugin uses the normal craft_fields you can copy it's settings and paste it in a new record


1

I've contacted Freeforms (Solspace). Unfortunately there is no solution for this problem (yet). Solspace told me: This functionality currently isn't possible with Freeform. It's something on our feature requests list though.


1

It sounds like what you would ultimately need here is some sort of grouping of fields feature, which Freeform currently does not have. So I would lean towards saying there isn't a way you can do this purely in Composer, unless of course you had a very stripped down Formatting template, and relied heavily on HTML blocks inside Composer to simulate what you're ...


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