Hi,
I m having a three controllers in my app.
Forms,attributes,Users
In my /forms/designpage
I m posting the datas as
$.ajax({
type: "POST",
url: "./attributes/untitledfieldname",
data: "sequence_no="+counter+"&type="+type,
success: function...
I have a User object that, upon successful authentication, is tucked into the session (sans security info) for easy recall and for determining whether we have an authenticated user or anonymous session. There are several paths by which the user can alter some or all of his or her information and I'd like to keep that session value up to ...
Hello
I have an existing PHP/MySQL application that I want to convert over to CakePHP.
Unfortuaintly I can not change the column names and they do not follow the CakePHP standard.
For example:
One of the table names is called "user" and its not plural. The primary key is called "user_id" instead of "id". The creation date is called ...
I have a method in users_controller.php of my CakePHP project which is used to remotely log a user in through an AJAX call on a WordPress site. The method works flawlessly when called through Firefox, but when I attempt to call it either via AJAX or directly from the browser in IE8 or Safari, it simply will not log in. The Auth->login() ...
Hi,
I m doing an app in CakePHP and JQuery,Mysql.
In this in my homepage i m listing down all my forms name.
On CLicking on this form name ,it will show the form.
WIthin that view i m having a code like below,
<?php echo $form->input($r['Attribute']['label'],array('type'=>'text','style"=width:'=>$r['Attribute']['size...
i am very new in cakephp, actually i want to show the all the list of subjects which is belong to one subject category ,
for this one i have made a subject model whic h code is below:
subjects.php
<?php
class Subject extends AppModel
{
var $name='Subject';
var $belongsTo = 'Subjectscat';
}
?>
and subject category model is:
subj...
Hi,
In my app i m using JQuery..In tat I m using tat Ajax GEt to retrive values from cakephp controller viewforms ....But if i alert myObject..It doesnt came..
It show me the error as
missing ) in parenthetical
{"attributes":[{"type":"Text","labels":"Untitled1"}]})
where
{"attributes":[{"type":"Text","labels":"Untitled1"}]}) ...
Hi, I tried to retrieve the value of a particular variable and alert it.
That is,I wanted to get the value "{"attributes":[{"type":"Text","labels":"Untitled1"}]}
" in that variable. Using the success: function(msg) in ajax ,I alerted the value.
But instead of the required value :{"attributes":[{"type":"Text","labels":"Untitled1"}]}
I ...
Hi,
<?php
echo $form->create('Form',array('action'=>'submit'));?>
<table>
<?php
if($r['Attribute']['type']=='Text')
{
echo $form->input($r['Attribute']['label'], array('type'=>'text','style' => 'width:' . $r['Attribute']['size'] . 'px'));
}
...
Hi,
I Want to separate the database functionality and logic part by having the database operations in the model and the logic part in the controller. Earlier I had all the code in the action part of the controller itself. I have tried something, but it doesn't work.
Some one guide me.
This is what I had earlier.
/* Controller *...
I'm developing a application with CakePHP, and I have two layouts: one for the home page, and another for the rest of the application. Except for some coding on the header, they're almost exactly the same. Is there something I can do to keep DRY, without using IFs all over the layout?
...
Hi,
In my controller
function designpage()
{
//to create a form Untitled
$this->Form->saveField('name','Untitled Form');
echo $this->Form->getLastInsertId();//here it works
}
function insertformname()
{
echo $this->Form->getLastInsertId(); //this doesnt echo at all
}
...
How to write this query using the find statement in cakephp
$this->Form->query("Select id from forms order by id DESC LIMIT 1")
...
Hi,
I m new to CakePhp and JQuery.
I am getting an error in using the cakephp code inside my JQuery.
My code
<script type="text/javascript">
$(document).ready(function(){
var attributeid;var fieldname;
$("#"+<?=$r['Attribute']['id'];?>).change(function () {
fieldname=<?=$r['Attribute']['label'];?>;
...
Can I use another Model inside one model?
Eg.
<?php
class Form extends AppModel
{
var $name='Form';
var $helpers=array('Html','Ajax','Javascript','Form');
var $components = array( 'RequestHandler','Email');
function saveFormName($data)
{
$this->data['Form']['formname']=$data['Form']['formn...
Given the following table structures:
Registered Participant model:
<?php
class RegisteredParticipant extends AppModel {
var $name = "RegisteredParticipant";
var $primaryKey = "id";
var $belongsTo = array(
'EventLocation' => array('className' => 'EventLocation'),
'RegistrationStatus' => array('className' => 'RegistrationStatus'),
...
I have images stored in mysql as mediablobs, and I'd like to load (show) them directly from the database without having to save them as files first.
I need to load multiple images into a table (thumbs), so the header command won't do it.
this is what I do:
$imagePath = 'files' . DS . 'recipe_' . $recipe['Recipe']['id'] . '.tmp';
...
hi,
I have two tables,Forms and Attributes. I'm tring to retrieve the last inserted id from the Forms table and insert it to the form_id column of the Attributes table, along with the other field columns.
Earlier I retrieved the form Id from the Forms table and used it to update the value of the Form name column. It worked fine.The cod...
i am little bit new in cakephp, i am making a form for adding class and its section, for this one i have made a controller which code is such like that---
addclasses_controller.php
function index()
{
$this->layout = 'internal';
$session_id=$this->Session->read('User.id');
$username = $this->User->find('all', array('conditio...
Hi,
I need some idea in Saving the Form entries..
In my app, i have designed the form using Cakephp and JQuery, saved the form and can view the form ..
While i fill the entries in the form it is saved in my Table Results
My results table is having (id,form_id,attribute_id,label,value)
I can view the form n times and can fill...