{"__v":0,"_id":"57dfc088ef837d0e00fd8a89","category":{"project":"571f5e8cd8667f0e00a3c498","version":"571f5e8cd8667f0e00a3c49b","_id":"57fd04caeaa77f19008b8202","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-10-11T15:27:06.099Z","from_sync":false,"order":6,"slug":"json-formats","title":"JSON Formats"},"parentDoc":null,"project":"571f5e8cd8667f0e00a3c498","user":"5720c075db52d01700f5d1e4","version":{"__v":12,"_id":"571f5e8cd8667f0e00a3c49b","hasDoc":true,"hasReference":true,"project":"571f5e8cd8667f0e00a3c498","createdAt":"2016-04-26T12:26:52.312Z","releaseDate":"2016-04-26T12:26:52.312Z","categories":["571f5e8cd8667f0e00a3c49c","571f73cfcb4baa0e00d13a80","571f7451cb4baa0e00d13a88","571f7d2720695f3400f38797","571f7fb0ac2a080e0014c661","571f884be54f2d0e003ebb0a","572200c9ecb38d0e00d80ebd","572c301e7c8eff0e00aaa174","57df91b2c6348d0e0020c452","57e104db9ff1e21900a721ab","57fd04caeaa77f19008b8202","5899c7113514ce0f0014da84"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-09-19T10:40:08.827Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"The form configuration provides all required informations to create an individual donation form based on the settings of your FundraisingBox. It contains all available form fields, payment methods, items and amount suggestions. You can retrieve this JSON with [forms/config](doc:formsconfig). Our jQuery-Plugin retrieves it automatically and provides the data with getter-functions.\n\n**form_fields**\nDetailed informations for every existing field in your form. The keys are the names of the fields, you have to use this name as key for your value for this field, e.g. the name is \"amount\", so you have to set your value to \"payment[amount]\".\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"form_fields\\\": {\\n  \\\"salutation\\\": {\\n    \\\"id\\\": \\\"payment_salutation\\\", // required for label and error div\\n    \\\"label\\\": \\\"Anrede\\\",\\n    \\\"type\\\": \\\"select\\\", // field type\\n    \\\"validator\\\": {\\n      \\\"type\\\": \\\"select\\\", // validator type\\n      \\\"required\\\": true // validator option\\n    },\\n    \\\"options\\\": {\\n      \\\"\\\": \\\"---\\\",\\n      \\\"Mrs.\\\": \\\"Frau\\\",\\n      \\\"Mr.\\\": \\\"Herr\\\"\\n    },\\n    \\\"field_html\\\": \\\"<select name=\\\\\\\"payment[salutation]\\\\\\\" id=\\\\\\\"payment_salutation\\\\\\\">\\\\n<option value=\\\\\\\"\\\\\\\" selected=\\\\\\\"selected\\\\\\\">---</option>\\\\n<option value=\\\\\\\"Mrs.\\\\\\\">Frau</option>\\\\n<option value=\\\\\\\"Mr.\\\\\\\">Herr</option>\\\\n</select>\\\",\\n    \\\"label_html\\\": \\\"<label for=\\\\\\\"payment_salutation\\\\\\\">Anrede&nbsp;*</label>\\\",\\n    \\\"error_html\\\": \\\"<div id='payment_salutation_error' class='error'></div>\\\"\\n  },\\n  ...\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nPossible field types:\n- text\n- select\n- radio\n- checkbox\n- textarea\n- hidden\n\nPossible validator types:\n- text\n- boolean\n- select\n- integer\n- number\n- date\n- email\n- country\n- iban\n- bic\n\nPossible validator options:\n- required\n- min_length\n- max_length\n\nOptions:\nIf it's a select- or radio-field this array contains the possible key-value-pairs in the order of your form settings.\n\nHTML:\nYou can use \"field_html\", \"label_html\" and \"error_html\" if you want to create your form dynamically.\n\n**payment_methods**\nInformations for all available payment methods in your form, in the order of your form settings. The keys are the possible values for the payment_method-field, e.g. payment[payment_method]=paypal\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"payment_methods\\\": {\\n  \\\"sepa_direct_debit\\\": {\\n    \\\"countries\\\": \\\"DE AT CH\\\", \\n    \\\"amount_min\\\": 0.01,\\n    \\\"amount_max\\\": 5000,\\n    \\\"label\\\": \\\"SEPA Lastschrift\\\",\\n    \\\"recurring\\\": true\\n  },\\n  ...\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n- *countries*: list of available countries for this payment method, retrieved from your payment extension settings\n- *amount_min*: retrieved from your payment extension settings\n- *amount_max*: retrieved from your payment extension settings\n- *label*: translated Label\n- *recurring*: indicates if this payment method is suitable for recurring payments\n\n**items**\nInformations for all available items in your form, in the order of your form settings. Contains invisible items as well (in difference to form_fields.fb_item_id)! The keys are the possible values for the fb_item_id-field.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"items\\\": {\\n  \\\"9306\\\": {\\n    \\\"title\\\": \\\"Maus\\\",\\n    \\\"amount\\\": 5,\\n    \\\"visible\\\": true\\n  },\\n  ...\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nRetrieved from your form settings:\n- *title*: name for this item\n- *amount*: minimum amount\n- *visible*: indicates if this item is visible\n\n**amount_suggestions**\nInformation for all available amount suggestions in your form, in the order of your form settings.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"amount_suggestions\\\":\\n[\\n  {\\n    \\\"amount\\\": \\\"5\\\",\\n    \\\"description\\\": \\\"Jede Spende hilft!\\\"\\n  },\\n  {\\n    \\\"amount\\\": \\\"10\\\",\\n    \\\"description\\\": \\\"Super, dass Sie uns unterstützen!\\\"\\n  },\\n  {\\n    \\\"amount\\\": \\\"50\\\",\\n    \\\"description\\\": \\\"Vielen Dank für die großzügige Spende!\\\"\\n  }\\n]\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n#Full Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  // information for every existing form field in your form\\n  \\\"form_fields\\\": {\\n    \\\"salutation\\\": {\\n      \\\"id\\\": \\\"payment_salutation\\\",\\n      \\\"label\\\": \\\"Anrede\\\",\\n      \\\"type\\\": \\\"select\\\",\\n      \\\"validator\\\": {\\n        \\\"type\\\": \\\"select\\\",\\n        \\\"required\\\": true\\n      },\\n      \\\"options\\\": {\\n        \\\"\\\": \\\"---\\\",\\n        \\\"Mrs.\\\": \\\"Frau\\\",\\n        \\\"Mr.\\\": \\\"Herr\\\"\\n      },\\n      \\\"field_html\\\": \\\"<select name=\\\\\\\"payment[salutation]\\\\\\\" id=\\\\\\\"payment_salutation\\\\\\\">\\\\n<option value=\\\\\\\"\\\\\\\" selected=\\\\\\\"selected\\\\\\\">---</option>\\\\n<option value=\\\\\\\"Mrs.\\\\\\\">Frau</option>\\\\n<option value=\\\\\\\"Mr.\\\\\\\">Herr</option>\\\\n</select>\\\",\\n      \\\"label_html\\\": \\\"<label for=\\\\\\\"payment_salutation\\\\\\\">Anrede&nbsp;*</label>\\\",\\n      \\\"error_html\\\": \\\"<div id='payment_salutation_error' class='error'></div>\\\"\\n    },\\n    \\\"first_name\\\": {\\n      \\\"id\\\": \\\"payment_first_name\\\",\\n      \\\"label\\\": \\\"Vorname\\\",\\n      \\\"type\\\": \\\"text\\\",\\n      \\\"validator\\\": {\\n        \\\"type\\\": \\\"text\\\",\\n        \\\"required\\\": true,\\n        \\\"max_length\\\": 100,\\n        \\\"min_length\\\": 2\\n      },\\n      \\\"field_html\\\": \\\"<input maxlength=\\\\\\\"100\\\\\\\" type=\\\\\\\"text\\\\\\\" name=\\\\\\\"payment[first_name]\\\\\\\" id=\\\\\\\"payment_first_name\\\\\\\" />\\\",\\n      \\\"label_html\\\": \\\"<label for=\\\\\\\"payment_first_name\\\\\\\">Vorname&nbsp;*</label>\\\",\\n      \\\"error_html\\\": \\\"<div id='payment_first_name_error' class='error'></div>\\\"\\n    },\\n    \\\"last_name\\\": {\\n      \\\"id\\\": \\\"payment_last_name\\\",\\n      \\\"label\\\": \\\"Nachname\\\",\\n      \\\"type\\\": \\\"text\\\",\\n      \\\"validator\\\": {\\n        \\\"type\\\": \\\"text\\\",\\n        \\\"required\\\": true,\\n        \\\"max_length\\\": 100,\\n        \\\"min_length\\\": 2\\n      },\\n      \\\"field_html\\\": \\\"<input maxlength=\\\\\\\"100\\\\\\\" type=\\\\\\\"text\\\\\\\" name=\\\\\\\"payment[last_name]\\\\\\\" id=\\\\\\\"payment_last_name\\\\\\\" />\\\",\\n      \\\"label_html\\\": \\\"<label for=\\\\\\\"payment_last_name\\\\\\\">Nachname&nbsp;*</label>\\\",\\n      \\\"error_html\\\": \\\"<div id='payment_last_name_error' class='error'></div>\\\"\\n    },\\n    \\\"email\\\": {\\n      \\\"id\\\": \\\"payment_email\\\",\\n      \\\"label\\\": \\\"E-Mail-Adresse\\\",\\n      \\\"type\\\": \\\"text\\\",\\n      \\\"validator\\\": {\\n        \\\"type\\\": \\\"email\\\",\\n        \\\"required\\\": false,\\n        \\\"max_length\\\": 100\\n      },\\n      \\\"field_html\\\": \\\"<input maxlength=\\\\\\\"100\\\\\\\" type=\\\\\\\"text\\\\\\\" name=\\\\\\\"payment[email]\\\\\\\" id=\\\\\\\"payment_email\\\\\\\" />\\\",\\n      \\\"label_html\\\": \\\"<label for=\\\\\\\"payment_email\\\\\\\">E-Mail-Adresse</label>\\\",\\n      \\\"error_html\\\": \\\"<div id='payment_email_error' class='error'></div>\\\"\\n    },\\n    \\\"country\\\": {\\n      \\\"id\\\": \\\"payment_country\\\",\\n      \\\"label\\\": \\\"Land\\\",\\n      \\\"type\\\": \\\"select\\\",\\n      \\\"validator\\\": {\\n        \\\"type\\\": \\\"country\\\",\\n        \\\"required\\\": false\\n      },\\n      \\\"options\\\": {\\n        \\\"\\\": \\\"\\\",\\n        \\\"AF\\\": \\\"Afghanistan\\\",\\n        \\\"AX\\\": \\\"Alandinseln\\\",\\n        \\\"AL\\\": \\\"Albanien\\\",\\n        \\\"DZ\\\": \\\"Algerien\\\",\\n        \\\"DE\\\": \\\"Deutschland\\\",\\n        \\\"AT\\\": \\\"Österreich\\\",\\n        \\\"CH\\\": \\\"Schweiz\\\",\\n        //...\\n      },\\n      \\\"field_html\\\": \\\"<select name=\\\\\\\"payment[country]\\\\\\\" id=\\\\\\\"payment_country\\\\\\\">\\\\n<option value=\\\\\\\"\\\\\\\" selected=\\\\\\\"selected\\\\\\\"></option>\\\\n<option value=\\\\\\\"AF\\\\\\\">Afghanistan</option>\\\\n [...] <option value=\\\\\\\"AT\\\\\\\">Österreich</option>\\\\n</select>\\\",\\n      \\\"label_html\\\": \\\"<label for=\\\\\\\"payment_country\\\\\\\">Land</label>\\\",\\n      \\\"error_html\\\": \\\"<div id='payment_country_error' class='error'></div>\\\"\\n    },\\n    \\\"amount\\\": {\\n      \\\"id\\\": \\\"payment_amount\\\",\\n      \\\"label\\\": \\\"Betrag\\\",\\n      \\\"type\\\": \\\"text\\\",\\n      \\\"validator\\\": {\\n        \\\"type\\\": \\\"number\\\",\\n        \\\"required\\\": false\\n      },\\n      \\\"field_html\\\": \\\"<input type=\\\\\\\"text\\\\\\\" name=\\\\\\\"payment[amount]\\\\\\\" id=\\\\\\\"payment_amount\\\\\\\" />\\\",\\n      \\\"label_html\\\": \\\"<label for=\\\\\\\"payment_amount\\\\\\\">Betrag</label>\\\",\\n      \\\"error_html\\\": \\\"<div id='payment_amount_error' class='error'></div>\\\"\\n    },\\n    \\\"fb_item_id\\\": {\\n      \\\"id\\\": \\\"payment_fb_item_id\\\",\\n      \\\"label\\\": \\\"Bitte wählen\\\",\\n      \\\"type\\\": \\\"radio\\\",\\n      \\\"validator\\\": {\\n        \\\"type\\\": \\\"select\\\",\\n        \\\"required\\\": true\\n      },\\n      \\\"options\\\": {\\n        \\\"9306\\\": \\\"Maus\\\",\\n        \\\"7210\\\": \\\"Hund\\\",\\n        \\\"8997\\\": \\\"Katze\\\"\\n      },\\n      \\\"field_html\\\": \\\"<div class=\\\\\\\"radio_list\\\\\\\"><div class=\\\\\\\"radio\\\\\\\"><input name=\\\\\\\"payment[fb_item_id]\\\\\\\" type=\\\\\\\"radio\\\\\\\" value=\\\\\\\"9306\\\\\\\" id=\\\\\\\"payment_fb_item_id_9306\\\\\\\" /><label for=\\\\\\\"payment_fb_item_id_9306\\\\\\\">Maus</label></div><div class=\\\\\\\"radio\\\\\\\"><input name=\\\\\\\"payment[fb_item_id]\\\\\\\" type=\\\\\\\"radio\\\\\\\" value=\\\\\\\"7210\\\\\\\" id=\\\\\\\"payment_fb_item_id_7210\\\\\\\" /><label for=\\\\\\\"payment_fb_item_id_7210\\\\\\\">Hund</label></div><div class=\\\\\\\"radio\\\\\\\"><input name=\\\\\\\"payment[fb_item_id]\\\\\\\" type=\\\\\\\"radio\\\\\\\" value=\\\\\\\"8997\\\\\\\" id=\\\\\\\"payment_fb_item_id_8997\\\\\\\" /><label for=\\\\\\\"payment_fb_item_id_8997\\\\\\\">Katze</label></div></div>\\\",\\n      \\\"label_html\\\": \\\"<label for=\\\\\\\"payment_fb_item_id\\\\\\\">Bitte wählen</label>\\\",\\n      \\\"error_html\\\": \\\"<div id='payment_fb_item_id_error' class='error'></div>\\\"\\n    },\\n    \\\"interval\\\": {\\n      \\\"id\\\": \\\"payment_interval\\\",\\n      \\\"label\\\": \\\"Rhythmus\\\",\\n      \\\"type\\\": \\\"select\\\",\\n      \\\"validator\\\": {\\n        \\\"type\\\": \\\"select\\\",\\n        \\\"required\\\": true\\n      },\\n      \\\"options\\\": {\\n        \\\"0\\\": \\\"einmalig\\\",\\n        \\\"1\\\": \\\"monatlich\\\",\\n        \\\"3\\\": \\\"vierteljährlich\\\",\\n        \\\"6\\\": \\\"halbjährlich\\\",\\n        \\\"12\\\": \\\"jährlich\\\"\\n      },\\n      \\\"field_html\\\": \\\"<select name=\\\\\\\"payment[interval]\\\\\\\" id=\\\\\\\"payment_interval\\\\\\\">\\\\n<option value=\\\\\\\"0\\\\\\\">einmalig</option>\\\\n<option value=\\\\\\\"1\\\\\\\">monatlich</option>\\\\n<option value=\\\\\\\"3\\\\\\\">vierteljährlich</option>\\\\n<option value=\\\\\\\"6\\\\\\\">halbjährlich</option>\\\\n<option value=\\\\\\\"12\\\\\\\">jährlich</option>\\\\n</select>\\\",\\n      \\\"label_html\\\": \\\"<label for=\\\\\\\"payment_interval\\\\\\\">Rhythmus</label>\\\",\\n      \\\"error_html\\\": \\\"<div id='payment_interval_error' class='error'></div>\\\"\\n    },\\n    \\\"wants_receipt\\\": {\\n      \\\"id\\\": \\\"payment_wants_receipt\\\",\\n      \\\"label\\\": \\\"Spendenquittung\\\",\\n      \\\"type\\\": \\\"select\\\",\\n      \\\"validator\\\": {\\n        \\\"type\\\": \\\"select\\\",\\n        \\\"required\\\": true\\n      },\\n      \\\"options\\\": {\\n        \\\"no_receipt\\\": \\\"nein, danke\\\",\\n        \\\"receipt_now\\\": \\\"ja, bitte\\\",\\n        \\\"receipt_end_of_year\\\": \\\"ja, bitte einmal im Jahr\\\"\\n      },\\n      \\\"field_html\\\": \\\"<select name=\\\\\\\"payment[wants_receipt]\\\\\\\" id=\\\\\\\"payment_wants_receipt\\\\\\\">\\\\n<option value=\\\\\\\"no_receipt\\\\\\\">nein, danke</option>\\\\n<option value=\\\\\\\"receipt_now\\\\\\\">ja, bitte</option>\\\\n<option value=\\\\\\\"receipt_end_of_year\\\\\\\">ja, bitte einmal im Jahr</option>\\\\n</select>\\\",\\n      \\\"label_html\\\": \\\"<label for=\\\\\\\"payment_wants_receipt\\\\\\\">Spendenquittung</label>\\\",\\n      \\\"error_html\\\": \\\"<div id='payment_wants_receipt_error' class='error'></div>\\\"\\n    },\\n    \\\"wants_newsletter\\\": {\\n      \\\"id\\\": \\\"payment_wants_newsletter\\\",\\n      \\\"label\\\": \\\"Bitte senden Sie mir weitere Informationen über Ihre Arbeit.\\\",\\n      \\\"type\\\": \\\"checkbox\\\",\\n      \\\"validator\\\": {\\n        \\\"type\\\": \\\"boolean\\\",\\n        \\\"required\\\": false\\n      },\\n      \\\"field_html\\\": \\\"<input type=\\\\\\\"checkbox\\\\\\\" name=\\\\\\\"payment[wants_newsletter]\\\\\\\" id=\\\\\\\"payment_wants_newsletter\\\\\\\" />\\\",\\n      \\\"label_html\\\": \\\"<label for=\\\\\\\"payment_wants_newsletter\\\\\\\">Bitte senden Sie mir weitere Informationen über Ihre Arbeit.</label>\\\",\\n      \\\"error_html\\\": \\\"<div id='payment_wants_newsletter_error' class='error'></div>\\\"\\n    },\\n    \\\"person_custom_field_1294\\\": {\\n      \\\"id\\\": \\\"payment_person_custom_field_1294\\\",\\n      \\\"label\\\": \\\"Benutzerdef. Datum\\\",\\n      \\\"type\\\": \\\"text\\\",\\n      \\\"validator\\\": {\\n        \\\"type\\\": \\\"date\\\",\\n        \\\"required\\\": false\\n      },\\n      \\\"field_html\\\": \\\"<input class=\\\\\\\"addDatepicker\\\\\\\" type=\\\\\\\"text\\\\\\\" name=\\\\\\\"payment[person_custom_field_1294]\\\\\\\" id=\\\\\\\"payment_person_custom_field_1294\\\\\\\" />\\\",\\n      \\\"label_html\\\": \\\"<label for=\\\\\\\"payment_person_custom_field_1294\\\\\\\">Benutzerdef. Datum</label>\\\",\\n      \\\"error_html\\\": \\\"<div id='payment_person_custom_field_1294_error' class='error'></div>\\\"\\n    },\\n    \\\"donation_custom_field_1293\\\": {\\n      \\\"id\\\": \\\"payment_donation_custom_field_1293\\\",\\n      \\\"label\\\": \\\"Benutzerdef. Checkbox\\\",\\n      \\\"type\\\": \\\"checkbox\\\",\\n      \\\"validator\\\": {\\n        \\\"type\\\": \\\"boolean\\\",\\n        \\\"required\\\": false\\n      },\\n      \\\"field_html\\\": \\\"<input class=\\\\\\\"checkbox\\\\\\\" type=\\\\\\\"checkbox\\\\\\\" name=\\\\\\\"payment[donation_custom_field_1293]\\\\\\\" id=\\\\\\\"payment_donation_custom_field_1293\\\\\\\" />\\\",\\n      \\\"label_html\\\": \\\"<label for=\\\\\\\"payment_donation_custom_field_1293\\\\\\\">Benutzerdef. Checkbox</label>\\\",\\n      \\\"error_html\\\": \\\"<div id='payment_donation_custom_field_1293_error' class='error'></div>\\\"\\n    },\\n    ...\\n  },\\n  // available ordered payment methods of your form\\n  \\\"payment_methods\\\": {\\n    \\\"paypal\\\": {\\n      \\\"countries\\\": \\\"\\\",\\n      \\\"amount_min\\\": 0.1,\\n      \\\"amount_max\\\": \\\"\\\",\\n      \\\"label\\\": \\\"PayPal\\\",\\n      \\\"recurring\\\": true\\n    },\\n    \\\"micropayment_credit_card\\\": {\\n      \\\"countries\\\": \\\"\\\",\\n      \\\"amount_min\\\": 2.5,\\n      \\\"amount_max\\\": 5000,\\n      \\\"label\\\": \\\"Kreditkarte\\\",\\n      \\\"recurring\\\": true\\n    },\\n    \\\"sofortueberweisung\\\": {\\n      \\\"countries\\\": \\\"\\\",\\n      \\\"amount_min\\\": 0.01,\\n      \\\"amount_max\\\": \\\"\\\",\\n      \\\"label\\\": \\\"Sofortüberweisung\\\",\\n      \\\"recurring\\\": false\\n    },\\n    \\\"sepa_direct_debit\\\": {\\n      \\\"countries\\\": \\\"BE BG DK DE EE FI FR GR GB IE IS IT HR LV LI LT LU MT MC NL NO AT PL PT RO SM SE CH SK SI ES CZ HU CY\\\",\\n      \\\"amount_min\\\": 0.01,\\n      \\\"amount_max\\\": 5000,\\n      \\\"label\\\": \\\"SEPA Lastschrift\\\",\\n      \\\"recurring\\\": true\\n    },\\n    ...\\n  },\\n  // available ordered items of your form\\n  \\\"items\\\": {\\n\\t\\t\\\"9306\\\": {\\n      \\\"title\\\": \\\"Maus\\\",\\n      \\\"amount\\\": 5,\\n      \\\"visible\\\": true,\\n      \\\"order\\\": 0\\n    },\\n    \\\"7210\\\": {\\n      \\\"title\\\": \\\"Hund\\\",\\n      \\\"amount\\\": 10,\\n      \\\"visible\\\": true,\\n      \\\"order\\\": 1\\n    },\\n    \\\"8997\\\": {\\n      \\\"title\\\": \\\"Katze\\\",\\n      \\\"amount\\\": 20,\\n      \\\"visible\\\": true,\\n      \\\"order\\\": 2\\n    },\\n    \\\"9305\\\": {\\n      \\\"title\\\": \\\"unsichtbarer Posten\\\",\\n      \\\"amount\\\": 30,\\n      \\\"visible\\\": false,\\n      \\\"order\\\": 3\\n    },\\n    ...\\n  },\\n  \\\"amount_suggestions\\\":\\n  [\\n    {\\n      \\\"amount\\\": \\\"5\\\",\\n      \\\"description\\\": \\\"Jede Spende hilft!\\\"\\n    },\\n    {\\n      \\\"amount\\\": \\\"10\\\",\\n      \\\"description\\\": \\\"Super, dass Sie uns unterstützen!\\\"\\n    },\\n    {\\n      \\\"amount\\\": \\\"50\\\",\\n      \\\"description\\\": \\\"Vielen Dank für die großzügige Spende!\\\"\\n    }\\n  ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"form-configuration-json","type":"basic","title":"Form Configuration JSON"}

Form Configuration JSON


The form configuration provides all required informations to create an individual donation form based on the settings of your FundraisingBox. It contains all available form fields, payment methods, items and amount suggestions. You can retrieve this JSON with [forms/config](doc:formsconfig). Our jQuery-Plugin retrieves it automatically and provides the data with getter-functions. **form_fields** Detailed informations for every existing field in your form. The keys are the names of the fields, you have to use this name as key for your value for this field, e.g. the name is "amount", so you have to set your value to "payment[amount]". [block:code] { "codes": [ { "code": "\"form_fields\": {\n \"salutation\": {\n \"id\": \"payment_salutation\", // required for label and error div\n \"label\": \"Anrede\",\n \"type\": \"select\", // field type\n \"validator\": {\n \"type\": \"select\", // validator type\n \"required\": true // validator option\n },\n \"options\": {\n \"\": \"---\",\n \"Mrs.\": \"Frau\",\n \"Mr.\": \"Herr\"\n },\n \"field_html\": \"<select name=\\\"payment[salutation]\\\" id=\\\"payment_salutation\\\">\\n<option value=\\\"\\\" selected=\\\"selected\\\">---</option>\\n<option value=\\\"Mrs.\\\">Frau</option>\\n<option value=\\\"Mr.\\\">Herr</option>\\n</select>\",\n \"label_html\": \"<label for=\\\"payment_salutation\\\">Anrede&nbsp;*</label>\",\n \"error_html\": \"<div id='payment_salutation_error' class='error'></div>\"\n },\n ...\n}", "language": "json" } ] } [/block] Possible field types: - text - select - radio - checkbox - textarea - hidden Possible validator types: - text - boolean - select - integer - number - date - email - country - iban - bic Possible validator options: - required - min_length - max_length Options: If it's a select- or radio-field this array contains the possible key-value-pairs in the order of your form settings. HTML: You can use "field_html", "label_html" and "error_html" if you want to create your form dynamically. **payment_methods** Informations for all available payment methods in your form, in the order of your form settings. The keys are the possible values for the payment_method-field, e.g. payment[payment_method]=paypal [block:code] { "codes": [ { "code": "\"payment_methods\": {\n \"sepa_direct_debit\": {\n \"countries\": \"DE AT CH\", \n \"amount_min\": 0.01,\n \"amount_max\": 5000,\n \"label\": \"SEPA Lastschrift\",\n \"recurring\": true\n },\n ...\n}", "language": "json" } ] } [/block] - *countries*: list of available countries for this payment method, retrieved from your payment extension settings - *amount_min*: retrieved from your payment extension settings - *amount_max*: retrieved from your payment extension settings - *label*: translated Label - *recurring*: indicates if this payment method is suitable for recurring payments **items** Informations for all available items in your form, in the order of your form settings. Contains invisible items as well (in difference to form_fields.fb_item_id)! The keys are the possible values for the fb_item_id-field. [block:code] { "codes": [ { "code": "\"items\": {\n \"9306\": {\n \"title\": \"Maus\",\n \"amount\": 5,\n \"visible\": true\n },\n ...\n}", "language": "json" } ] } [/block] Retrieved from your form settings: - *title*: name for this item - *amount*: minimum amount - *visible*: indicates if this item is visible **amount_suggestions** Information for all available amount suggestions in your form, in the order of your form settings. [block:code] { "codes": [ { "code": "\"amount_suggestions\":\n[\n {\n \"amount\": \"5\",\n \"description\": \"Jede Spende hilft!\"\n },\n {\n \"amount\": \"10\",\n \"description\": \"Super, dass Sie uns unterstützen!\"\n },\n {\n \"amount\": \"50\",\n \"description\": \"Vielen Dank für die großzügige Spende!\"\n }\n]", "language": "json" } ] } [/block] #Full Example [block:code] { "codes": [ { "code": "{\n // information for every existing form field in your form\n \"form_fields\": {\n \"salutation\": {\n \"id\": \"payment_salutation\",\n \"label\": \"Anrede\",\n \"type\": \"select\",\n \"validator\": {\n \"type\": \"select\",\n \"required\": true\n },\n \"options\": {\n \"\": \"---\",\n \"Mrs.\": \"Frau\",\n \"Mr.\": \"Herr\"\n },\n \"field_html\": \"<select name=\\\"payment[salutation]\\\" id=\\\"payment_salutation\\\">\\n<option value=\\\"\\\" selected=\\\"selected\\\">---</option>\\n<option value=\\\"Mrs.\\\">Frau</option>\\n<option value=\\\"Mr.\\\">Herr</option>\\n</select>\",\n \"label_html\": \"<label for=\\\"payment_salutation\\\">Anrede&nbsp;*</label>\",\n \"error_html\": \"<div id='payment_salutation_error' class='error'></div>\"\n },\n \"first_name\": {\n \"id\": \"payment_first_name\",\n \"label\": \"Vorname\",\n \"type\": \"text\",\n \"validator\": {\n \"type\": \"text\",\n \"required\": true,\n \"max_length\": 100,\n \"min_length\": 2\n },\n \"field_html\": \"<input maxlength=\\\"100\\\" type=\\\"text\\\" name=\\\"payment[first_name]\\\" id=\\\"payment_first_name\\\" />\",\n \"label_html\": \"<label for=\\\"payment_first_name\\\">Vorname&nbsp;*</label>\",\n \"error_html\": \"<div id='payment_first_name_error' class='error'></div>\"\n },\n \"last_name\": {\n \"id\": \"payment_last_name\",\n \"label\": \"Nachname\",\n \"type\": \"text\",\n \"validator\": {\n \"type\": \"text\",\n \"required\": true,\n \"max_length\": 100,\n \"min_length\": 2\n },\n \"field_html\": \"<input maxlength=\\\"100\\\" type=\\\"text\\\" name=\\\"payment[last_name]\\\" id=\\\"payment_last_name\\\" />\",\n \"label_html\": \"<label for=\\\"payment_last_name\\\">Nachname&nbsp;*</label>\",\n \"error_html\": \"<div id='payment_last_name_error' class='error'></div>\"\n },\n \"email\": {\n \"id\": \"payment_email\",\n \"label\": \"E-Mail-Adresse\",\n \"type\": \"text\",\n \"validator\": {\n \"type\": \"email\",\n \"required\": false,\n \"max_length\": 100\n },\n \"field_html\": \"<input maxlength=\\\"100\\\" type=\\\"text\\\" name=\\\"payment[email]\\\" id=\\\"payment_email\\\" />\",\n \"label_html\": \"<label for=\\\"payment_email\\\">E-Mail-Adresse</label>\",\n \"error_html\": \"<div id='payment_email_error' class='error'></div>\"\n },\n \"country\": {\n \"id\": \"payment_country\",\n \"label\": \"Land\",\n \"type\": \"select\",\n \"validator\": {\n \"type\": \"country\",\n \"required\": false\n },\n \"options\": {\n \"\": \"\",\n \"AF\": \"Afghanistan\",\n \"AX\": \"Alandinseln\",\n \"AL\": \"Albanien\",\n \"DZ\": \"Algerien\",\n \"DE\": \"Deutschland\",\n \"AT\": \"Österreich\",\n \"CH\": \"Schweiz\",\n //...\n },\n \"field_html\": \"<select name=\\\"payment[country]\\\" id=\\\"payment_country\\\">\\n<option value=\\\"\\\" selected=\\\"selected\\\"></option>\\n<option value=\\\"AF\\\">Afghanistan</option>\\n [...] <option value=\\\"AT\\\">Österreich</option>\\n</select>\",\n \"label_html\": \"<label for=\\\"payment_country\\\">Land</label>\",\n \"error_html\": \"<div id='payment_country_error' class='error'></div>\"\n },\n \"amount\": {\n \"id\": \"payment_amount\",\n \"label\": \"Betrag\",\n \"type\": \"text\",\n \"validator\": {\n \"type\": \"number\",\n \"required\": false\n },\n \"field_html\": \"<input type=\\\"text\\\" name=\\\"payment[amount]\\\" id=\\\"payment_amount\\\" />\",\n \"label_html\": \"<label for=\\\"payment_amount\\\">Betrag</label>\",\n \"error_html\": \"<div id='payment_amount_error' class='error'></div>\"\n },\n \"fb_item_id\": {\n \"id\": \"payment_fb_item_id\",\n \"label\": \"Bitte wählen\",\n \"type\": \"radio\",\n \"validator\": {\n \"type\": \"select\",\n \"required\": true\n },\n \"options\": {\n \"9306\": \"Maus\",\n \"7210\": \"Hund\",\n \"8997\": \"Katze\"\n },\n \"field_html\": \"<div class=\\\"radio_list\\\"><div class=\\\"radio\\\"><input name=\\\"payment[fb_item_id]\\\" type=\\\"radio\\\" value=\\\"9306\\\" id=\\\"payment_fb_item_id_9306\\\" /><label for=\\\"payment_fb_item_id_9306\\\">Maus</label></div><div class=\\\"radio\\\"><input name=\\\"payment[fb_item_id]\\\" type=\\\"radio\\\" value=\\\"7210\\\" id=\\\"payment_fb_item_id_7210\\\" /><label for=\\\"payment_fb_item_id_7210\\\">Hund</label></div><div class=\\\"radio\\\"><input name=\\\"payment[fb_item_id]\\\" type=\\\"radio\\\" value=\\\"8997\\\" id=\\\"payment_fb_item_id_8997\\\" /><label for=\\\"payment_fb_item_id_8997\\\">Katze</label></div></div>\",\n \"label_html\": \"<label for=\\\"payment_fb_item_id\\\">Bitte wählen</label>\",\n \"error_html\": \"<div id='payment_fb_item_id_error' class='error'></div>\"\n },\n \"interval\": {\n \"id\": \"payment_interval\",\n \"label\": \"Rhythmus\",\n \"type\": \"select\",\n \"validator\": {\n \"type\": \"select\",\n \"required\": true\n },\n \"options\": {\n \"0\": \"einmalig\",\n \"1\": \"monatlich\",\n \"3\": \"vierteljährlich\",\n \"6\": \"halbjährlich\",\n \"12\": \"jährlich\"\n },\n \"field_html\": \"<select name=\\\"payment[interval]\\\" id=\\\"payment_interval\\\">\\n<option value=\\\"0\\\">einmalig</option>\\n<option value=\\\"1\\\">monatlich</option>\\n<option value=\\\"3\\\">vierteljährlich</option>\\n<option value=\\\"6\\\">halbjährlich</option>\\n<option value=\\\"12\\\">jährlich</option>\\n</select>\",\n \"label_html\": \"<label for=\\\"payment_interval\\\">Rhythmus</label>\",\n \"error_html\": \"<div id='payment_interval_error' class='error'></div>\"\n },\n \"wants_receipt\": {\n \"id\": \"payment_wants_receipt\",\n \"label\": \"Spendenquittung\",\n \"type\": \"select\",\n \"validator\": {\n \"type\": \"select\",\n \"required\": true\n },\n \"options\": {\n \"no_receipt\": \"nein, danke\",\n \"receipt_now\": \"ja, bitte\",\n \"receipt_end_of_year\": \"ja, bitte einmal im Jahr\"\n },\n \"field_html\": \"<select name=\\\"payment[wants_receipt]\\\" id=\\\"payment_wants_receipt\\\">\\n<option value=\\\"no_receipt\\\">nein, danke</option>\\n<option value=\\\"receipt_now\\\">ja, bitte</option>\\n<option value=\\\"receipt_end_of_year\\\">ja, bitte einmal im Jahr</option>\\n</select>\",\n \"label_html\": \"<label for=\\\"payment_wants_receipt\\\">Spendenquittung</label>\",\n \"error_html\": \"<div id='payment_wants_receipt_error' class='error'></div>\"\n },\n \"wants_newsletter\": {\n \"id\": \"payment_wants_newsletter\",\n \"label\": \"Bitte senden Sie mir weitere Informationen über Ihre Arbeit.\",\n \"type\": \"checkbox\",\n \"validator\": {\n \"type\": \"boolean\",\n \"required\": false\n },\n \"field_html\": \"<input type=\\\"checkbox\\\" name=\\\"payment[wants_newsletter]\\\" id=\\\"payment_wants_newsletter\\\" />\",\n \"label_html\": \"<label for=\\\"payment_wants_newsletter\\\">Bitte senden Sie mir weitere Informationen über Ihre Arbeit.</label>\",\n \"error_html\": \"<div id='payment_wants_newsletter_error' class='error'></div>\"\n },\n \"person_custom_field_1294\": {\n \"id\": \"payment_person_custom_field_1294\",\n \"label\": \"Benutzerdef. Datum\",\n \"type\": \"text\",\n \"validator\": {\n \"type\": \"date\",\n \"required\": false\n },\n \"field_html\": \"<input class=\\\"addDatepicker\\\" type=\\\"text\\\" name=\\\"payment[person_custom_field_1294]\\\" id=\\\"payment_person_custom_field_1294\\\" />\",\n \"label_html\": \"<label for=\\\"payment_person_custom_field_1294\\\">Benutzerdef. Datum</label>\",\n \"error_html\": \"<div id='payment_person_custom_field_1294_error' class='error'></div>\"\n },\n \"donation_custom_field_1293\": {\n \"id\": \"payment_donation_custom_field_1293\",\n \"label\": \"Benutzerdef. Checkbox\",\n \"type\": \"checkbox\",\n \"validator\": {\n \"type\": \"boolean\",\n \"required\": false\n },\n \"field_html\": \"<input class=\\\"checkbox\\\" type=\\\"checkbox\\\" name=\\\"payment[donation_custom_field_1293]\\\" id=\\\"payment_donation_custom_field_1293\\\" />\",\n \"label_html\": \"<label for=\\\"payment_donation_custom_field_1293\\\">Benutzerdef. Checkbox</label>\",\n \"error_html\": \"<div id='payment_donation_custom_field_1293_error' class='error'></div>\"\n },\n ...\n },\n // available ordered payment methods of your form\n \"payment_methods\": {\n \"paypal\": {\n \"countries\": \"\",\n \"amount_min\": 0.1,\n \"amount_max\": \"\",\n \"label\": \"PayPal\",\n \"recurring\": true\n },\n \"micropayment_credit_card\": {\n \"countries\": \"\",\n \"amount_min\": 2.5,\n \"amount_max\": 5000,\n \"label\": \"Kreditkarte\",\n \"recurring\": true\n },\n \"sofortueberweisung\": {\n \"countries\": \"\",\n \"amount_min\": 0.01,\n \"amount_max\": \"\",\n \"label\": \"Sofortüberweisung\",\n \"recurring\": false\n },\n \"sepa_direct_debit\": {\n \"countries\": \"BE BG DK DE EE FI FR GR GB IE IS IT HR LV LI LT LU MT MC NL NO AT PL PT RO SM SE CH SK SI ES CZ HU CY\",\n \"amount_min\": 0.01,\n \"amount_max\": 5000,\n \"label\": \"SEPA Lastschrift\",\n \"recurring\": true\n },\n ...\n },\n // available ordered items of your form\n \"items\": {\n\t\t\"9306\": {\n \"title\": \"Maus\",\n \"amount\": 5,\n \"visible\": true,\n \"order\": 0\n },\n \"7210\": {\n \"title\": \"Hund\",\n \"amount\": 10,\n \"visible\": true,\n \"order\": 1\n },\n \"8997\": {\n \"title\": \"Katze\",\n \"amount\": 20,\n \"visible\": true,\n \"order\": 2\n },\n \"9305\": {\n \"title\": \"unsichtbarer Posten\",\n \"amount\": 30,\n \"visible\": false,\n \"order\": 3\n },\n ...\n },\n \"amount_suggestions\":\n [\n {\n \"amount\": \"5\",\n \"description\": \"Jede Spende hilft!\"\n },\n {\n \"amount\": \"10\",\n \"description\": \"Super, dass Sie uns unterstützen!\"\n },\n {\n \"amount\": \"50\",\n \"description\": \"Vielen Dank für die großzügige Spende!\"\n }\n ]\n}", "language": "json" } ] } [/block]