JCI-Plugin and Contact Form 7

Contact Form 7 is a very popular WordPress-Plugin for creating forms on a wordpress-page. From Version 3.10 on the JSON Content Importer Plugin is able to insert JSON-data into the fields of a Contact7-Form.

Example-JSON:
{“id”:”214658″}

Challenge:
Inserting the JSON-Datafield id into Contact7-Form.

Step 1 is creating a Contact7-Form:
Like “[text* your-name “json-id is: {{id}}”][submit “Send”]”
The {{id}} is the twig-placeholder for the JSON-data: You can insert any twig-code into the Contact7-Form (as long as the Contact7-syntax is not destroyed).

<label> Your Name (required)
    [text* your-id "id: {{id}}"] </label>
[submit "Send"]

Step 2 is creating a jsoncontentimporterpro-Template:
Insert the Contact Forms 7 Shortcode: NO_CF is the no of the created CF-Form (copypaste it from the Contact7-form-list):

[contact-form-7 404 "Not Found"]

Step 3: JCI-Shortcode
[jsoncontentimporterpro id=NO_GOT_FOR_THE_TEMPLATE]

Step 4: Change JSON Content Importer Plugin option
By default the jsoncontentimporterpro-Shortcode is evaluated first, and after that the Contact7-shortcode. Then there is no chance to insert JSON-data into Contact7.
Therefore change “Usage of other shortcodes:” in the “Shortcode-Setting”-tab of the JSON Content Importer Plugin options to “Executing Shortcodes in the template first and then evaluate the twig-code: use this for TablePress, Contact Form 7 etc. “