Need help connecting to Formassembly

Created on 14 June 2024, 16 days ago
Updated 18 June 2024, 12 days ago

on formassembly website it says for the API and PHP all i have to do is add some php code to a page.

Why the heck is Drupal so hard to get this working?

$context = stream_context_create(array('http' => array('ignore_errors' => true)));
if (!isset($_GET['tfa_next'])) {
$qs = ' ';
if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) {
$qs = '?' . $_SERVER['QUERY_STRING'];
};
echo file_get_contents('MY_FORMASSEMBLY_URL' . $qs);
} else {
echo file_get_contents('MY_FORMASSEMBLY_URL/rest' . $_GET['tfa_next'], false, $context);
}

reference from: https://help.formassembly.com/help/340360-use-a-server-side-script-api#s...

πŸ’¬ Support request
Status

Fixed

Version

1.4

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @vcgnetwork
  • Status changed to Needs review 15 days ago
  • πŸ‡ΊπŸ‡ΈUnited States FatherShawn New York

    The purpose of this module is to allow a site builder to integrate with FormAssembly without writing a single line of code. If you would like to create a custom integration using FormAssembly API directly (also used in this module's code) then I would recommend
    href="https://www.packtpub.com/product/drupal-10-development-cookbook-third-ed...">Drupal
    10 Development Cookbook - Third Edition or the paid tutorials at href="https://drupalize.me">drupalize.me. I know Matt & Kevin and the people behind Drupalize.me and all are excellent! If you want cost-free help learning to develop in Drupal, I recommend the excellent camps and local meetup groups along with
    href=" https://www.drupal.org/community/contributor-guide/reference-information... β†’ ">Drupal
    Slack and Drupal Answers

    I know from the direct contact that we had that you are using Drupal 8.9 and the last version of this module that worked in D8 was 1.4. Both are no longer supported but I have reinstalled both locally and I'm going to lead you through the setup here because Drupal is as much a community as a software framework.

    1. I understand that you have this module installed (present in the code
      base). Also verify that it is enabled in the site configuration:
      alt="Formassembly module showing enabled status on the Extend page"/>
      If it is not enabled, that is if the checkbox is not checked, then check it
      and click install.
    2. Next browse to the base configuration page for this module by going to
      Structure >> FormAssembly Forms or /admin/structure/fa_form/settings
    3. Fill in the form shown on this page by placing the proper values in the
      three fields. If you have filled out this form before, as I suspect you
      have, then click the "Reauthorize" checkbox.
      alt="Formassembly configuration form"/>
    4. Click submit
    5. You should be redirected to FormAssembly to login and authorize the
      connection.
    6. You should then be redirected back to your site
    7. You should then see this success message displayed above the configuration
      form.
    8. Click the checkbox next to "Sync now"
    9. Click Submit
    10. You will see a batch process run with a progress bar. When it completes,
      browse to Content >> FormAssembly Forms or /formassembly/fa_form.
      You should see the forms that your FormAssembly user has access to. If your
      instance of FormAssembly is an enterprise instance and your user has access
      to the admin index of forms in FormAssembly, you may return to the
      configuration form, click the "Admin index" checkbox, the "Sync now" and
      resubmit the form to make all the forms into the Drupal site.

    Once your forms are listed in Drupal they will be treated as native Drupal content. You may display them on their own page, reference them in a reference field and therefore display them inside other content or however else you want to use them.

  • πŸ‡ΊπŸ‡ΈUnited States FatherShawn New York

    For the security of your site, you should make a plan to get to Drupal 10 as your version of Drupal, the PHP version it supports, and the Symfony dependencies, are all beyond end-of-life and out of security support.

    See https://www.drupal.org/docs/upgrading-drupal/drupal-8-and-higher β†’ for guides to get to Drupal 9 and then to go from 9 to 10

  • Status changed to Fixed 12 days ago
  • πŸ‡ΊπŸ‡ΈUnited States FatherShawn New York
  • πŸ‡ΊπŸ‡ΈUnited States FatherShawn New York
Production build 0.69.0 2024