Forums

DB Table does not update with new fields

wiebwieb 20 Oct, 2014
Hi,

I think I saw this elsewhere, but I can't find it now. I added/changed some fields on my form,
Selected Create Table, but the new fields do not display when I select Show Data, or in the list on Data View.
They are in the debugging array, and on my confirmation form.

Is there a way to delete the table and recreate it?

I added RequestorEmail, EmailSubjectLine and UploadFile. (I actually deleted and added the first two items.)

Here is my record view:
Field title Field value
cf_id 9
cf_uid f02c42aab83e4a2d4833daf15c65624f
cf_created 2014-10-20 21:27:21
cf_modified 0000-00-00 00:00:00
cf_created_by 0
cf_modified_by 0
cf_ipaddress 10.79.45.18
cf_user_id 0
RequestorName test
CommunicationPurpose test
Audience test
cc test
ScheduledDelivery 30-10-2014 17:26:38
prerequisites test
approvers test
DataRequirements test
CommunicationContent test
Emailsubjectline
printreq Yes
FromMailbox cherrmann@osc.state.ny.us
webequiv Yes
ReplyMailbox wieb2@yahoo.com

Here is data view:
Forms Manager
Form Wizard
Easy Form Wizard
Validate Installation
Apply Updates
Field title Field value
cf_id 9
cf_uid f02c42aab83e4a2d4833daf15c65624f
cf_created 2014-10-20 21:27:21
cf_modified 0000-00-00 00:00:00
cf_created_by 0
cf_modified_by 0
cf_ipaddress 10.79.45.18
cf_user_id 0
RequestorName test
CommunicationPurpose test
Audience test
cc test
ScheduledDelivery 30-10-2014 17:26:38
prerequisites test
approvers test
DataRequirements test
CommunicationContent test
Emailsubjectline
printreq Yes
FromMailbox cherrmann@osc.state.ny.us
webequiv Yes
ReplyMailbox wieb2@yahoo.com

Here is debugging info:
Data Array:
Array
(
[option] => com_chronoforms
[chronoform] => InterTracCommunicationRequest
[event] => submit
[RequestorName] => test
[RequestorEmail] => test@test.com
[CommunicationPurpose] => test
[Audience] => test
[cc] => test
[ScheduledDelivery] => 30-10-2014 17:26:38
[prerequisites] => test
[approvers] => test
[DataRequirements] => test
[EmailSubjectLine] => test
[CommunicationContent] => test
[LetterUpload] =>
[printreq] => Yes
[FromMailbox] => cherrmann@osc.state.ny.us
[webequiv] => Yes
[ReplyMailbox] => wieb2@yahoo.com
[input_submit_14] => Submit
[b56a1d66c3b2071a8b9d89c58a63a9d3] => 1
[chronoform_data] => Array
(
[cf_uid] => f02c42aab83e4a2d4833daf15c65624f
[cf_created] => 2014-10-20 21:27:21
[cf_created_by] => 0
[cf_ipaddress] => 10.79.45.18
[cf_user_id] => 0
[option] => com_chronoforms
[chronoform] => InterTracCommunicationRequest
[event] => submit
[RequestorName] => test
[RequestorEmail] => test@test.com
[CommunicationPurpose] => test
[Audience] => test
[cc] => test
[ScheduledDelivery] => 30-10-2014 17:26:38
[prerequisites] => test
[approvers] => test
[DataRequirements] => test
[EmailSubjectLine] => test
[CommunicationContent] => test
[LetterUpload] =>
[printreq] => Yes
[FromMailbox] => cherrmann@osc.state.ny.us
[webequiv] => Yes
[ReplyMailbox] => wieb2@yahoo.com
[input_submit_14] => Submit
[b56a1d66c3b2071a8b9d89c58a63a9d3] => 1
[cf_id] => 9
)

[chronoform_data_cf_id] => 9
)

Validation Errors:
Array
(
)

My confirmation data has two of the new fields (but not the update file):
Requestor Name* test
Requestor's email address* test
Purpose of Communication* test
Audience* test
cc test
Scheduled Delivery* { ScheduledDelivery}
Prerequisites test
Approver(s)* test
Data Requirements test
Communication Content* test
Email subject line* { Emailsubjectline }
Does every recipient (contact) need to receive the communication?* Yes
From Mailbox* cherrmann@osc.state.ny.us
Will there be a web page equivalent? Yes
Reply Mailbox, if different wieb2@yahoo.com

--------------------------------------------
On a separate note, I have a required radio box, but no error message is displayed if you don't choose a button. The form stops you, but you don't get a message.

Thanks!
Cindy

PS Please mark my earlier message answered.
GreyHead 21 Oct, 2014
Hi Cindy,

Please click the Delete Cache icon in the Forms Manager toolbar to make CF update its records of the table columns.

I can't tell from here what the problem with the radio button is. Please post a link to the form so I can take a quick look.

Bob
wiebwieb 21 Oct, 2014
Bob,

I'm sorry, but I don't see the Delete Cache icon. I've attached a screen print of what I'm seeing so you can guide me. Also of how the radio button is defined. I can't give you a link since it is on our intranet.😟

Thanks!!!
Cindy[attachment=0]10-21-2014 8-12-26 AM.gif[/attachment]
wiebwieb 21 Oct, 2014
Bob,

I clicked on Quick Cache Cleaning/Clean Cache - which I think is a Joomla function. Now I am seeing all my fields, but my RequestorEmail is being populated with RequestorName, and RequestorEmail is not on the record.

Array
(
    [option] => com_chronoforms
    [chronoform] => InterTracCommunicationRequest
    [event] => submit
    [RequestorName] => Ringo Starr
    [RequestorEmail] => rstarr@gmail.com

Confirmation screen:
Requestor Name*	Ringo Starr
Requestor's email address*	Ringo Starr

Record View:
Field title	Field value
cf_id	10
cf_uid	6ffb925b9e35839b04cd314af368823e
cf_created	2014-10-21 12:39:42
cf_modified	0000-00-00 00:00:00
cf_created_by	0
cf_modified_by	0
cf_ipaddress	10.79.45.18
cf_user_id	0
RequestorName	Ringo Starr
CommunicationPurpose	test
Audience	test


Thanks!
Cindy
GreyHead 21 Oct, 2014
Hi Cindy,

My apologies. I misunderstood your post - and the Delete Cache icon is in CFv5 not in CFv4.

Please see this FAQ - I think that answers the right question,

Bob
pat01 30 Oct, 2014
Hello Bob

CF5 should be improved by adding sort of Check to the function Create table.

If one or more form fields have been added or changed, the function Create table should check for these fields in the existing database table and add or change the structure there accordingly.

Doing this manually, with phpMyAdmin for example, is impossible for non-experienced users.

Patrick
GreyHead 30 Oct, 2014
Hi Patrick,

I'm sure that is on Max's 'nice to add one day list' but for the moment the Create Table function is just a simple table creator, it has no editing functions - that would involve a lot more coding. If there is no valuable data in the table you can always ignore it and create a new one with the added columns.

Bob
This topic is locked and no more replies can be posted.