JCI-Plugin and Contact Form 7 (D)


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:
http://api.json-content-importer.com/extra/json/meetup/1.json

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

Step 1 is creating a Contact7-Form:
Like [text* your-name "json-id is: {{_context.0.id}}"]
The {{_context.0.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).


[submit "Submit"]

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 id="NO_CF" title="whatever"]]

Step 3: JCI-Shortcode
[jsoncontentimporterpro nameoftemplate=NAME_GIVEN_IN_TEMPLATE orderofshortcodeeval=2]