Hello all
At one end - a ChronoForm full of submission details
At the other end - an Access database in the office
Can the filled-in form be made to update the Access database by any known method, and what degree of rocket science will it involve?
All help gratefully received, even a firm and sympathetic 'No'
Andrew | ECF
:?
Thanks Bob, most grateful ...
"Save the data to a MySQL table..." - is there a low-idiot-level guide to this bit anywhere handy?
Thanks again ... 😶
Hi Andrew,
There's a basic tutorial available from the Tutorial's link above. Please ask if you have any problems.
Bob
Bob
Thank you for your forbearance. We shall give it a go and see what happens.
Have a great weekend
Andrew | ECF
🙂
Hello again - the weekends fly, don't they?
Form created, table attached - but (and it's a hairy but) -
no matter how carefully each field is named (to match our database at this end) the CSV / Excel file that the database generates contains default names (text_7, text_4) - requiring a lot of jiggery pokery to match things up. Is this a limitation of the ChronoForms app? Can it be massaged? :?
Hi Andrew,
A bit short of detail here - those names are the input names in the form html. To change them - edit the form html.
Bob
Sorry Bob - more detail ...
When you make a form in the handy wizard, the 'what it is and how you want it' dialogue on the right gives you the opportunity to give each entry a label, a tooltip and a field name. I've made them to carefully match the names in our expectant database. Nonetheless, the CSV or Excel form generated after a test entry has all of the fields in place - one per column - but as before, text_4, text_8 etc. And all out of order too, text fields in no particular order and drop down choosers lumped together at the end. What am I doing wrong?
Hi Andrew,
I wonder if the Excel code is reading the ids rather than the names - for some reason the wizard doesn't let you change the input ids (though you can do it in the Form HTML).
The sequence is probably down to the way that CF parses the form html for names - it looks at the selects atter the inputs so the drop-downs get left to the end.
Frankly you'd probably be better off copying the Excel save code and hacking it to do exactly what you want rather than fighting the battle of getting the two to match up. It's not difficult code. I'll see if I can find an example.
Bob
Thanks Bob - I'll look forward to it, despite the quiver of fear that the word 'code' sends tripping down my backbone
😑
Bob
You're kind to sort this out for me. I was right with you up until 'You'll see that it uses a $table_fields array' - from then on, this is all completely beyond me, sorry. I'm just an <sad> old HTML Webmonkey failing to keep up with an inherited Joomla site </sad>. <sincere> Thanks again for all your help </sincere>, looks like scissors and glue better go on the stationery order form - it's time to cut and paste!
Regards
Andrew
Hi Andrew,
Please post a list of the table field names (the MySQL create statement is good) and the corresponding Excel column names
Bob
Bob - you're a persistent blighter, most admirable ...
... the MySQL create statement is good - sorry, where does this live?
... and the corresponding Excel column names -
cf_id uid recordtime ipaddress cf_user_id text_4 text_7 text_8 text_10 text_11 text_12 text_13 text_14 text_15 text_16 text_19 text_21 text_22 text_24 text_26 text_27 text_28 text_29 text_31 select_34 select_32 select_30 select_31 text_32
Halfway there ... I'm happy to carry on if you are
Hi Andrew,
If you look at the database table from the ChronoForms data viewer, or from PHPMYAdmin you should be able to find a corresponding list of the column names from the table.
Bob
Hey Bob, hope all is 'formidable' in Brittany ...
'If you look at the database table from the ChronoForms data viewer' - my stupid light has come on here - can't find a tab or a menu choice called 'data viewer' - what am I missing (apart from my quota of grey matter)
Hi Andrew,
Oui bien, all id 'formidable' here except the weather which is just mixed up.
In the Forms Manager there's a DB Connection column to the right. If you have a connection the table name will be a link, click the link and you can look at the data.
Bob