Alvaro Cobo
|
| Posted: 11/05/2005, 2:03 PM |
|
Hi guys:
I have a Record Form, which doesn´t depend in any database table. I just
need to send the data input in this form to another custom page created by
hand. But when I try to recover the post
($variable1=$_POST['submited_variable'];) values in the custom page, I get
no result. I do not write the form by hand because I need to use some
validation and other stuff created within the Record Form.
The page properties are as follows:
Allow Insert, Update, Delete set to "No".
Preserve paramenters: GET and POST.
The Submit button has the "type" set to "submit".
And the return page (both in the button and the form) is set to the
custom page.
What could be the problem?. How could I submit a CCS form and recover the
data in a non-CCS script?.
Thanks a lot,
Alvaro.
-------------------------------------
"If you have an apple and I have an apple and we exchange these apples then
you and I will still each have one apple. But if you have an idea and I have
an idea and we exchange these ideas, then each of us will have two ideas"
--George Bernard Shaw--
|
|
|
 |
Alvaro Cobo
|
| Posted: 11/05/2005, 3:01 PM |
|
Hi guys. The problem is solved, and I found the solution it in an old CCS
PHP thread (http://forums.yessoftware.com/posts.php?post_id=55849).
Just for future references.
In the "Before Show" actions of the record form I have added a "Set tag"
action. In the "Tag Name" I set 'Action' and in the "Expresion" I set the
page I want the data submitted (quoted).
To preserve the $_GET value I have in the current form, I have edited the
action recovering the data with a CCGetFromGet function just like the
following example
function NewRecord1_BeforeShow()
{
$NewRecord1_BeforeShow = true;
//End NewRecord1_BeforeShow
//Set Tag @9-C1DF7EE1
global $Tpl;
$Tpl->SetVar("Action",
"payment/payment_process.php?PK_Cr=".CCGetFromGet(PK_Cr, '0'));
//End Set Tag
//Close NewRecord1_BeforeShow @2-0FB12030
return $NewRecord1_BeforeShow;
}
//End Close NewRecord1_BeforeShow
Anyway, Is there a stright way to do the same, without having to do all this
stuff?.
Best regards,
Alvaro
"Alvaro Cobo" <coboalvaro@gmail.com> escribió en el mensaje
news:dkja76$om2$1@news.codecharge.com...
> Hi guys:
>
> I have a Record Form, which doesn´t depend in any database table. I just
> need to send the data input in this form to another custom page created by
> hand. But when I try to recover the post
> ($variable1=$_POST['submited_variable'];) values in the custom page, I get
> no result. I do not write the form by hand because I need to use some
> validation and other stuff created within the Record Form.
>
> The page properties are as follows:
> Allow Insert, Update, Delete set to "No".
> Preserve paramenters: GET and POST.
> The Submit button has the "type" set to "submit".
> And the return page (both in the button and the form) is set to the
> custom page.
>
> What could be the problem?. How could I submit a CCS form and recover the
> data in a non-CCS script?.
>
> Thanks a lot,
>
> Alvaro.
>
> -------------------------------------
> "If you have an apple and I have an apple and we exchange these apples
then
> you and I will still each have one apple. But if you have an idea and I
have
> an idea and we exchange these ideas, then each of us will have two ideas"
> --George Bernard Shaw--
>
>
|
|
|
 |
DonB
|
| Posted: 11/06/2005, 6:04 PM |
|
Not really.
A CCS page POSTs back to itself, thus that page is where the form values are
sent (i.e., not to the other page where you want to use them). Thus you
have to send them to the other page, in this example that's being done by
attaching them to the URL.
You could alter the action attribute of the first page's <FORM>, but then
the 'validation and other stuff' won't be executed.
Another option would be to stuff the values into Session variables, or a
single Session variable by putting all the values into one array - and put
the array in the Session var.
--
DonB
http://www.gotodon.com/ccbth
"Alvaro Cobo" <coboalvaro@gmail.com> wrote in message
news:dkjdjh$q46$1@news.codecharge.com...
> Hi guys. The problem is solved, and I found the solution it in an old CCS
> PHP thread (http://forums.yessoftware.com/posts.php?post_id=55849).
>
> Just for future references.
>
> In the "Before Show" actions of the record form I have added a "Set tag"
> action. In the "Tag Name" I set 'Action' and in the "Expresion" I set the
> page I want the data submitted (quoted).
>
> To preserve the $_GET value I have in the current form, I have edited the
> action recovering the data with a CCGetFromGet function just like the
> following example
>
> function NewRecord1_BeforeShow()
> {
> $NewRecord1_BeforeShow = true;
> //End NewRecord1_BeforeShow
>
> //Set Tag @9-C1DF7EE1
> global $Tpl;
> $Tpl->SetVar("Action",
> "payment/payment_process.php?PK_Cr=".CCGetFromGet(PK_Cr, '0'));
> //End Set Tag
>
> //Close NewRecord1_BeforeShow @2-0FB12030
> return $NewRecord1_BeforeShow;
> }
> //End Close NewRecord1_BeforeShow
>
> Anyway, Is there a stright way to do the same, without having to do all
this
> stuff?.
>
> Best regards,
>
> Alvaro
>
> "Alvaro Cobo" <coboalvaro@gmail.com> escribió en el mensaje
>news:dkja76$om2$1@news.codecharge.com...
> > Hi guys:
> >
> > I have a Record Form, which doesn´t depend in any database table. I just
> > need to send the data input in this form to another custom page created
by
> > hand. But when I try to recover the post
> > ($variable1=$_POST['submited_variable'];) values in the custom page, I
get
> > no result. I do not write the form by hand because I need to use some
> > validation and other stuff created within the Record Form.
> >
> > The page properties are as follows:
> > Allow Insert, Update, Delete set to "No".
> > Preserve paramenters: GET and POST.
> > The Submit button has the "type" set to "submit".
> > And the return page (both in the button and the form) is set to the
> > custom page.
> >
> > What could be the problem?. How could I submit a CCS form and recover
the
> > data in a non-CCS script?.
> >
> > Thanks a lot,
> >
> > Alvaro.
> >
> > -------------------------------------
> > "If you have an apple and I have an apple and we exchange these apples
> then
> > you and I will still each have one apple. But if you have an idea and I
> have
> > an idea and we exchange these ideas, then each of us will have two
ideas"
> > --George Bernard Shaw--
> >
> >
>
>
|
|
|
 |
|