Skip to content

4.1.0

Latest

Choose a tag to compare

@engram-design engram-design released this 24 Nov 11:43
· 13 commits to craft-5 since this release

Added

  • Added a Source Site setting to Entries fields so a form can list and save entries from another Craft site.
  • Added a first-run screen to the Forms index. Until the first form is created, it shows “Create your first form” and a New form button, which picks a form group when there are any that you can use on the current site, in place of the empty form list and its header button.
  • Added Country (Label) and Country (Value) to the choices for Address fields in integration mappings and variables, so a mapping can send the country’s name instead of its ISO code. (#3158)

Changed

  • The Form Templates, Email Templates and PDF Templates settings pages now explain what Formie uses until you add a template of your own, instead of showing an empty table with “No data available.”
  • The Reports page now reads “Create your first report” before the first report is created, for people who can create reports.
  • Synced fields now keep their conditions, Match Field, Calculations formula, Payment field settings, Hidden field default value, and File Upload subfolder path and filename format for each form, as they already did for Required. Changing one of these in a form no longer changes the other forms that use the field, and the form builder’s synced field notice now says so. (#3159)

Fixed

  • Fixed HTML fields that used Twig before upgrading to Formie 4 showing their Twig code to visitors instead of rendering it, because the upgrade left Allow Twig off. Updating turns Allow Twig on for HTML fields in forms and stencils that use Twig and have no Allow Twig setting saved yet. Fields that already have one keep it, and nothing changes on sites with Allow Twig in HTML Fields turned off. Twig that uses something Formie’s sandbox blocks, such as craft.entries, still needs changing, as described in HTML.
  • Fixed HTML fields whose Twig can’t be rendered, such as Twig the sandbox blocks, breaking the whole page when devMode is off, including in form templates that call getRenderedHtmlContent(). The field now renders nothing and logs the error to the Formie log, and still shows the error when devMode is on. The form builder preview still shows “Unable to render HTML preview.”
  • Fixed synced fields with settings that point at other fields breaking in every other form that uses them when a new form was created from a stencil containing them. Conditions, Match Field, Calculations formulas, Payment field amounts and other payment settings, Hidden field default values, and File Upload subfolder paths and filename formats were rewritten to point at the new form’s fields. Conditional fields stayed hidden, calculations stayed empty and payments failed, including in the original form. Each form now keeps its own copy of these settings for a synced field, as it already did for Required, so changing them in one form no longer changes the others. Updating repairs affected forms that have a field with the same handle. (#3159)
  • Fixed creating a form from a stencil reverting later changes to its synced fields, such as a new label or options, in every form that uses them. New forms now take each synced field’s current settings instead of the stencil’s saved copy.
  • Fixed duplicating a form, or saving it as a new form, failing with “Handle "missingField" has already been taken.” when it had more than one field whose type is unavailable, such as a type from an uninstalled plugin or a disabled type. With one such field, the copy renamed it to “Missing Field”. Exports and stencils of these forms also lost those fields’ labels and handles. Copies now keep each field’s own label and handle.
  • Fixed file uploads in client-rendered forms always failing with “The file could not be staged. Please select it again.” when Craft’s headlessMode is on, including File Upload fields set to Upload Manager. Their upload URLs pointed at the control panel, where Formie couldn’t find the form for visitors. (#3157)
  • Fixed server-rendered forms failing to submit with “Public submissions require the site request contract.” when Craft’s headlessMode is on, such as forms a headless front end loads from Formie’s render action. Changing pages, clearing the submission and refreshing the form’s tokens failed the same way, and Google address auto-complete couldn’t fill in the visitor’s current location. Their URLs pointed at the control panel instead of Craft’s /actions/ route.
  • Fixed forms with a File Upload field set to Upload Manager submitting without a file that failed to upload, so the submission was saved without it. The field now asks for the failed file to be removed first. Client-rendered forms also submitted while files were still uploading, and now wait for them as server-rendered forms do.
  • Fixed Opayo Payment fields not being able to start a payment for visitors when Craft’s headlessMode is on. Their payment session URL pointed at the control panel, where Formie couldn’t find the form for visitors.
  • Fixed forms with a Stripe Payment field set to a dynamic currency failing to render with “Cannot find ISO currency”. The currency field’s values can be upper or lower case, such as NOK or nok. (#3156)
  • Fixed Stripe and PayPal Payment fields with a dynamic amount reading the amount from the field’s ID instead of the field’s value in the browser. PayPal orders were created for that amount, and Stripe’s Payment Element was given it, although Stripe charged the right amount. (#3156)
  • Fixed Stripe and PayPal Payment fields with a dynamic amount or currency not using the visitor’s answers in client-rendered forms built with @verbb/formie-vue, @verbb/formie-react or the Formie web components. (#3156)
  • Fixed Stripe Payment fields charging 100 times the amount in Malagasy ariary (MGA), which Stripe charges in whole ariary. The payment was still recorded with the form’s amount, so review MGA payments and subscriptions taken before updating in your Stripe dashboard.
  • Fixed Stripe Payment fields in Bahraini dinar, Jordanian dinar, Kuwaiti dinar, Omani rial and Tunisian dinar (BHD, JOD, KWD, OMR and TND) sending Stripe amounts it doesn’t accept, such as 1.235 KWD, because Stripe needs the last of the three decimals to be 0. Formie now rounds these amounts to the nearest 0.01 and records the payment at the rounded amount. With a dynamic currency, Stripe’s Payment Element was also given a tenth of the amount.
  • Fixed optional Checkboxes fields, and Dropdown fields that allow multiple options, failing validation with “The input value must be an array.” when Limit Options was turned on and no options were selected. (#3154)
  • Fixed page reload submissions and page tab navigation adding Craft’s path parameter to the page URL, such as ?p=events/my-event, on servers that route requests through index.php?p=, including Apache with Craft’s default .htaccess. (#3155)
  • Fixed integration field mappings that were left empty in Formie 3 showing as “Use text exactly as entered” text boxes after saving the form, instead of the Don’t Include field dropdown.
  • Fixed integration field mappings set to a variable other than a field, such as Form Name or Current Date/Time, showing as Don’t Include once a transform was added, with no Configure Value option to change or remove the transform. The mapping was saved and sent correctly.
  • Fixed Address fields showing a blank country in submission exports and summaries, and leaving it out of the address in emails, once the submission’s country was no longer in the field’s Allowed Countries. Reports and the field’s block in emails, such as in All Fields, showed its ISO code instead of its name. These now show the country’s name, and a stored country that matches no country shows as stored.
  • Fixed File Upload fields set to Upload Manager often failing with “Invalid upload creation capability.” in forms on a different domain to Craft, such as forms a headless front end loads from Formie’s render action with the cross-origin-public request profile. Uploads failed whenever the file was picked after the form had refreshed its tokens on load.