Skip to content

Settings and connecting to Doxtly

The module has one settings page. It says where your Doxtly is and, if you want authors to pick forms from a list and find them when they add a link, holds the access key. Forms on your pages work without a key: it only changes how authors choose them.

Available when: the Drupal user has the Administer Doxtly Forms permission, usually an administrator

Open Configuration → Web services → Doxtly Forms, or click Configure under the module’s description on the Extend page.

The Doxtly Forms settings page with the Connection and Access key cards on the left and Embedding a form on the right, status Not connected
The Connection card with the Application URL field and Advanced opened to show the API URL field
Field What it is for Default
Application URL The address you open Doxtly at, such as https://app.doxtly.com, or https://northbridge.app.doxtly.com if your organization has a subdomain. Every page with a form loads it from here. https://app.doxtly.com
API URL (under Advanced) Where Drupal reads the lists of forms and interactive documents. Leave it empty: the module takes the Application URL and turns its app part into api. Worked out from the Application URL

API URL matters only if your Application URL has no app part in it. The module then opens Advanced by itself and says so. This field is used for the lists authors choose from, not for showing forms to visitors. Links found with the editor button use the Application URL.

Both must be valid http or https addresses. A trailing slash is removed for you.

Saving this page also clears the pages Drupal has cached with a form on them, so a new address reaches visitors straight away.

An access key lets Drupal ask Doxtly what it can offer your authors. Without one, they type or paste a form’s ID, and the editor button finds nothing in Doxtly. What a key gives depends on its permissions, and you choose only what you need:

Permission What authors get Without it
List forms A list of form names in the block, the field and the editor button, and your active forms in the link search Forms are entered by their ID and the link search doesn’t find them
List interactive documents Your active interactive documents in the link search Nothing changes for forms. Skip it if you only embed forms.
List quizzes, List surveys A list of your active quizzes and surveys on the Quiz or survey tab of the editor button, and both in the link search Quizzes and surveys are placed by their token, and links to them are pasted
Read themes of public pages A list of your Doxtly themes under Doxtly theme, wherever forms, quizzes and surveys are placed The theme set in Doxtly is used, or a theme’s ID is typed

Available when: your Doxtly role holds Manage access keys, to create the key

Keys are part of every plan. A key belongs to the organization and not to a person, so it keeps working when a colleague leaves.

  1. On the settings page, click create an access key. This opens the new key form in Doxtly, at the address you entered as the Application URL.

  2. Give the key a name that says what it is for, such as “Website (Drupal module)”.

  3. Under Permissions, choose List forms. To link to interactive documents as well, add List interactive documents, and for quizzes and surveys List quizzes and List surveys. The module needs no more. You can only give a key what your own role allows.

    The Create access key page in Doxtly with the name Website (Drupal module) and the permissions List forms and List interactive documents
  4. Click Create access key and copy the API key and the API secret. Doxtly shows the secret only once.

  5. Back in Drupal, paste them into API key and API secret and click Save changes.

The page then checks the connection and tells you what the key can read.

The Access key card with the status Connected, the saved key shown by its first characters and the message Connected. Active forms to choose from: 28. Active interactive documents to link to: 6.

What you need to know about the saved key:

  • Only Drupal uses it. It never reaches a visitor’s or an author’s browser. Authors get names, IDs and links through your own site.
  • It is stored encrypted, and the page never shows it again. You see its first few characters so that you can tell which key is saved.
  • It stays out of Drupal’s configuration, so a configuration export doesn’t carry it to another environment. Each environment has its own key, saved on its own settings page.
  • It can do nothing but read the lists, if you gave it only the permissions above.
  • Leave a field empty when you save and the stored value stays. That is how you replace only the secret after rotating a key.

Check again repeats the test straight away, against Doxtly itself. Saving the settings forgets the lists held in Drupal, so the next look reads them afresh.

The label beside Access key tells you where you stand.

Label What it means
Not connected No key is saved. Authors enter forms by their ID.
Checking… The page is reading the lists.
Connected The list of forms was read. The message below it gives the number of active forms and of active interactive documents. If the key lacks List interactive documents, it says so. That is no fault: a site that only embeds forms needs nothing more.
Connected, without forms The key reads interactive documents but lacks List forms, so forms are entered by their ID and the link search doesn’t find them.
Connection failed The list of forms could not be read. The message says why. See Troubleshooting.
Cannot be decrypted The saved key no longer opens. See below.
The Access key card with the status Connection failed and a message that Doxtly refused the access key

Drupal encrypts the access key with a secret that lives outside its database, so a copy of the database alone does not give the key away. That secret is the value of $settings['doxtly_forms_encryption_key'] if settings.php sets it, and otherwise your site’s $settings['hash_salt'].

Most sites never need to think about this. To give the module a secret of its own, add one line to settings.php, or ask whoever hosts your site to, and then enter the access key again:

$settings['doxtly_forms_encryption_key'] = 'a-long-random-string-of-your-own';

If that secret changes later, the stored key can no longer be read. This also happens when you copy a site’s database to another environment with a different hash_salt. The status changes to Cannot be decrypted. Forms on your pages carry on working. Enter the key and the secret again.

The Access key card with the status Cannot be decrypted and a warning to enter the key and the secret again

Tick Remove the saved access key (forms are then entered by their ID) and click Save changes. Forms already placed on pages keep working. To cut the connection from the other side as well, disable or delete the key in Doxtly.

The card on the right is a reminder for whoever opens this page: the four ways to place a form, a tag with a Copy button and the list of tag attributes. It changes nothing. The copied tag holds a placeholder, so replace your-form-id with a real ID. The card below it, Linking to a form or an interactive document, sums up the link search.

The Embedding a form card with the block, field, editor button and tag methods and the table of tag attributes
Message What happened
Settings saved. Everything was stored.
The settings were not saved: an address is not a valid http(s) URL. Nothing was stored. Correct the address and save again.
The addresses were saved, but the access key was not: enter both the API key and the API secret, without spaces. The addresses are stored. A key needs both halves, and neither may contain a space.

The module has two permissions, under People → Permissions. Drupal gives both to the administrator role. Every other role starts with neither, so Use Doxtly Forms has to be given to your authors by hand.

The Doxtly Forms group on the Permissions page, with Administer Doxtly Forms and Use Doxtly Forms, ticked for Administrator, and Use Doxtly Forms ticked for a Forms author role
Drupal user Can
A role with Administer Doxtly Forms Everything on this page, and they get an Open the settings link in the picker’s notices. Drupal marks this permission as one for trusted roles only.
A role with Use Doxtly Forms Choose forms from the list in the block, the field and the editor button, and find forms and interactive documents in the link search. They do not see this page.
Anyone else who edits content Type a form’s ID in the block and the field, and write a tag by hand in a format with the filter. The Doxtly button is there but greyed out.
Visitors Nothing. They only see the published forms, and showing a form needs no permission.

Placing a block or adding a field needs the permissions Drupal asks for anyway, such as Administer blocks.