As Brunos time is better invested in creating new awesome MIGX stuff I'll try to document my first attempt with migxFormbuilder =)
0. Make sure you have FormIt and bloX (
https://github.com/Bruno17/bloX/blob/master/packages/blox-1.2.1-beta3.transport.zip) installed, as migxFormbuilder seems to build on top this extras (I had an installation error with bloX 1.2.1beta3 and had to copy/paste the snippet code manually in the manager, using 2.2.8pl and MIGX 2.5.4pl)
1. Download the package from
https://github.com/Bruno17/migxFormbuilder/blob/master/packages/migxformbuilder-1.0.9-pl.transport.zip
2. Copy the package to your MODx installation at core/packages/
3. Go to Package Management in the manager and when loaded click "Search for packages locally" in the dropdown menu
4. The migxFormbuilder package should show up as uninstalled package in the grid, install it
5. Reload the manager and go to Componentes > migxFormbuilder
6. In the CMP click the Button "Create Form"
7. Create a Form and the corresponding fields, Save it
here I also get stuck =), how can I add the created form to the frontend? Do I need Formit and BloX? And which snippet to use to build the form with what kind of params? I guess &form_id and &task (and eventually &debug_formit)?
According to
https://github.com/Bruno17/bloX it could be something like
[[bloX?
&packagename=`migxformbuilder`
&component=`migxformbuilder`
&project=`migxformbuilder`
&classname=`mfbForm`
&task=`buildform`
&form_id=`1`
&debug_formit=`0`
]]
If I put this in a resource content field, the before created form actually shows up (kind of a big thing as I was just trying around =D), but when I fill it out and send it, nothing happens, neither to the db nor is an email sent (both were checked in the form configuration initially, then disabled save to db and just want the email, but didn't help). I have errors like the following in the log:
Array
(
[0] => 42S02
[1] => 1146
[2] => Table 'tablename.modx_migxformbuilder_forms' doesn't exist
)
[2013-07-09 13:15:37] (ERROR @ /assets/components/migx/connector.php) Error 42S02 executing statement:
Array
(
[0] => 42S02
[1] => 1146
[2] => Table 'tablename.modx_migxformbuilder_formrequests' doesn't exist
)
[2013-07-09 13:15:49] (ERROR @ /assets/components/migx/connector.php) addPackage called with an invalid package name.
The table "tablename.modx_migxformbuilder_forms" is actually there, the "tablename.modx_migxformbuilder_formrequests" is not...I created the table manually via MIGX Config CMP (packagename "migxformbuilder" > XML Schema (Load schema) > parse Schema > Create Tables) but even when there the form submissions do not get logged...
these errors seem to come from using the cmp (or installation?) because when the form is submitted (without any effect), nothing is logged, when debug_formit is set to true I just get an array of FormIt settings printed out in the frontend, but that seems to be more or less correct (homephone is not added by myself, it seems to be added automatically as a hidden field to prevent spam with the honeypot method)
Array
(
[hooks] => mfb_form2db,email,redirect
[validate] => homephone:blank,firstname:required,lastname:required,address:required,city:required,email:required:email
[packagename] => migxformbuilder
[classname] => mfbFormRequest
[emailTo] => [email protected]
[emailSubject] => MIGXFormbuilder Test
[emailTpl] => migxFormReportTpl
[redirectTo] => 202
)
EDIT: When save to db is enabled again I get the following error when submitting the form:
[2013-07-09 14:03:34] (ERROR @ /assets/components/migx/connector.php) Error 42S02 executing statement:
Array
(
[0] => 42S02
[1] => 1146
[2] => Table 'tablename.modx_migxformbuilder_formrequests' doesn't exist
)
[2013-07-09 14:03:39] (ERROR @ /assets/components/migx/connector.php) addPackage called with an invalid package name.
I'm pretty sure that these come from a wrong bloX config param, but that's not too surprising because I just guessed the params, so any hint how to correct this would be very welcome =).
Another problem that occured was what should happen after the form is submitted, it somehow messes up the URI...as I guess if nothing is specified in the "Select a ThankYou Page"-dropdown, it should stay on the page the form is included in (after submit), but it changes the address to domain.tld/de/outsites/outsites/labs.html (when the form is located at domain.tld/de/outsites/labs.html)...this problem persists when a resouce is selected in the TankYou Page dropdown...
Additionally it would be nice if we could specify the text shown in the submit button (inside the Form configuration).
To be able to select ThankYou resources from the form config dropdown, you need to specify the parent resource in the system settings for migxformbuilder!
I can also not select anything in the "Select a ThankYou page" dropdown in the form configuration, the dropdown is just empty. I would also find it nice to have (may additional to the resource dropdown) a textarea where a Thank-You-Text could be placed (maybe even richtext?) which would replace the form markup after the form is successfully submitted (or display an error message = another richtext-area when an error showed up). This would probably be very easy to add if the config file for migxformbuilder would be listed in the main MIGX configurator (under configs) and could be edited there...can you give me a hint where this file is living?)
[ed. note: exside last edited this post 13 years, 3 months ago.]