Thursday, December 30, 2010

Re: post form data from URL

It seems easy one .

<?php echo Router::url($this->here, true); ?>


assign the same to a variable and then send it to Form->Input

Thanks
Karthik

On Thu, Dec 30, 2010 at 10:20 PM, Steve Mallett <steve.mallett@gmail.com> wrote:
ping. sorry.
S

On Thu, Dec 30, 2010 at 9:15 AM, Steve Mallett <steve.mallett@gmail.com> wrote:
> Sorry, no. I'd like to populate the form data from variables given in the url:
> localhost/links/add?url=http://cakephp.or
>
> This would be like a delicious.com bookmarklet or someone creating a
> link on their own sites which would populate the form data.
>
> Steve
>
>
> On Thu, Dec 30, 2010 at 1:07 AM, Karthikeyan P <pkaarthikeyan@gmail.com> wrote:
>> I guess I got your question correctly, what u want to do is Pre-Populate the
>> form on loading
>>
>> I think you have to see the EDIT function in the BLOG tutorial of cakePHP.
>> There we actually PRE-POPULATE the data on the EDIT page .
>>
>> Thanks
>> Karthikeyan P
>>
>> On Thu, Dec 30, 2010 at 8:14 AM, Steve Mallett <steve.mallett@gmail.com>
>> wrote:
>>>
>>> Hi,
>>>
>>> How do I pass data to a Form from the URL?
>>>
>>> I have add.ctp:
>>>
>>>        <?php
>>>                echo $this->Form->input('url', array(
>>>                  'type' => 'text',
>>>                  'value' => $this->params['url']
>>>                ));
>>>        ?>
>>>
>>> Hitting localhost/links/add?url=http://cakephp.org produces the following
>>> error:
>>>
>>> Notice (8): Undefined index: action [CORE/cake/dispatcher.php, line 269]
>>> -and-
>>> Notice (8): Undefined index: controller [CORE/cake/dispatcher.php, line
>>> 121]
>>>
>>>
>>> Thanks.
>>> Steve
>>>
>>> Check out the new CakePHP Questions site http://cakeqs.org and help others
>>> with their CakePHP related questions.
>>>
>>> You received this message because you are subscribed to the Google Groups
>>> "CakePHP" group.
>>> To post to this group, send email to cake-php@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscribe@googlegroups.com For more options, visit this group
>>> at http://groups.google.com/group/cake-php?hl=en
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help others
>> with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscribe@googlegroups.com For more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: