form not saving to all fields

Brown 10 Nov, 2014
Hi

I have a testimonial component installed and to keep everything consistent on the website I am using Chronoforms to collect the testimonials instead of the default form for the component.

My problem is that the Chronoforms form is writing to all of the fields except the one where the actual testimonial is written.

The database save is saving to the correct table.

The field name is exactly the same as the one on the table (I copied and pasted from phpMyadmin).

I dragged in a debug and the insert query shows that this one field is not being written to.

I must be missing something quite basic but can't discover what it may be so any help in solving this would be greatly appreciated.
Brown 10 Nov, 2014
I have fixed it (sort of).

Eventually I used Chronoforms v4, it connected and wrote to the database as I wanted it to using the same information as used in v5. I had to change the other forms on the website to v4 to keep the consistency.

Not quite what I wanted but a suitable fix.
GreyHead 11 Nov, 2014
Hi Brown,

Do you still have the CFv5 form installed? If so Please drag a Debugger action into the On Submit event, then submit the form and post the debug results here.

There's no obvious reason why the textarea data isn't saving.

Bob
Brown 11 Nov, 2014
Hi Bob

Thanks for the reply.

Here is the results of the debug.
Array
(
    [chronoform] => testimonial
    [event] => submit
    [name] => dave
    [email] => dave@dave.com
    [testimonial] => 
    [captcha] => 
    [button5] => Send Testimonial
    [language] => *
    [state] => 0
    [ip_address] => 87.242.180.27
    [id] => 82
)

Array
(
)

Errors

Array
(
)

Debug Info

Array
(
    [6] => Array
        (
            [Email] => Array
                (
                    [0] => An email with the details below was sent successfully:
                    [1] => To:admin@websitemagician.co.uk
                    [2] => Subject:testimonial
                    [3] => From name:Photopoint 
                    [4] => From email:testimonials@photopoint.uk.com
                    [5] => CC:
                    [6] => BCC:
                    [7] => Reply name:
                    [8] => Reply email:
                    [9] => Attachments:
                    [10] => Body:
<table>
<tr><td>Name</td><td>dave</td></tr>
<tr><td>Email</td><td>dave@dave.com</td></tr>
<tr><td>Testimonial</td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
</table><br /><br />IP: 87.242.180.27
                )

        )

    [10] => Array
        (
            [DB Save] => Array
                (
                    [Queries] => Array
                        (
                            [0] => INSERT INTO `hire_sl_testimonials` (`name`, `email`, `testimonial`, `language`, `state`, `created`) values ('dave', 'dave@dave.com', '', '*', '0', '2014-11-11 15:25:02');
                        )

                )

        )

)

testimonial is the correct name of the field in the table. I used the same names in v4 and it works.

I would very much like to understand why this would not work in v5 so if you spot any errors I have made I would appreciate your help.

Dave
Max_admin 11 Nov, 2014
Hi Dave,

The "testimonial" field is empty in the data array and this is why its saving an empty string, What actions do you have in the "on submit" event of your form ?

regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Brown 12 Nov, 2014
Hi Max

Here is a list of actions in the 'on submit' event.
[list]Enabled
Table name is correct
Save Model ID - NO
Multi Save - NO
Model ID - Data
Force Save - NO
Update conditions - Empty
[/list]

Hope this helps.

Regards
Dave
GreyHead 12 Nov, 2014
Hi Dave,

Those are the settings for the DB Save action which all look OK. I think that Max wanted to know what other actions you have in the On Submit event of the form before the DB Save. He is trying to discover why $form->data['testimonial'] is empty.

Bob
Brown 12 Nov, 2014
Hi Bob

Sorry, I misunderstood.

The other actions (in order) are;
[list]Check Captcha
DB save
Display message
Email
Debugger[/list]

Cheers
Dave
GreyHead 12 Nov, 2014
Hi Dave,

That all looks OK too :-(

Please post a link to the form so I can take a quick look.

Bob
Brown 12 Nov, 2014
Hi Bob

Do you mean a link to the page where the form is visible or to the admin panel?

Dave
Brown 12 Nov, 2014
Answer
Hi Bob

I've solved it!!

The form is on the page using the plugin and I checked to make sure it was in <div> tags not <p> tags and that was fine but I had not checked the relative URL setting in the 'render form' action - as soon as I set it to NO the text was displaying in the field.

Thanks for your help and patience.

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