PRO: Send Form-Data to API



This is done in this way:
1. Create a 1st JCI-Template:
Name of Template: senddata2form
URL: dummyrequest (we don’t need a API when just displaying the Form)
urlparam4twig: inp
twig-template:

<form action=/send-form-data-to-api/>
<input type=text name=inp  value="{{urlparam.inp | e}}"><br>
<input type=submit value="Send Data">
</form>
{% if urlparam.inp %}
{% set sc = "[[jsoncontentimporterpro nameoftemplate=senddata url=https://api.json-content-importer.com/extra/json/storeanswer.php?insert="~urlparam.inp~"]]" %}
{% set scExe = (sc | doshortcode) %}
{{scExe}}
{% endif %}

Then use the following Shortcode on a page with URL /send-form-data-to-api/

[[jsoncontentimporterpro nameoftemplate="senddata2form" orderofshortcodeeval=10]]

2. In the above twig-template we call a JCI-Template named senddata. Let’S create this:
Name of Template: senddata
URL: empty (we send the URL in the Shortcode)
urlparam4twig: inp
twig-template:

hello senddata: {{nojsonvalue}}