This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

jprevot
jprevot

When I do a ajax request that runs twice Example;

function onSend(){

$this['message'] = "Hoola";

$Inbox = new Inbox;

$Inbox->classified_id = $this->param('id');
$Inbox->name =  post('name');
$Inbox->messge = post('msg');
$Inbox->email = post('email');
$Inbox->phone = post('phone');

$Inbox->save();

return 0;

}

when I run with data-request me insert two records

ndcisiv
ndcisiv

In your layout do you have both {% framework %} and {% framework extras %} listed?

binitghetiya
binitghetiya

I had same problem by looking close to my code.

i found that i was implementing

{% framework %} and {% framework extras %}

Please make sure you only include one module and it works fine.

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.