-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP Array format compatibility #221
Comments
billbarsch
added a commit
to billbarsch/alpaca
that referenced
this issue
Mar 16, 2015
This change make alpaca sends fields names as php can parce it like multidimentional arrays As detailed explained here: gitana#221
This is exactly what I needed, thanks for doing this investigation and proposing a workaround. |
huge +1, or is this no more actual ? |
I think it is ok today
Em ter, 31 de jan de 2017 às 18:18, GautierMichelin <
notifications@github.com> escreveu:
… huge +1, or is this no more actual ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#221 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEIZLdgzd-d6teSJFSyPr37JqDDIRMMkks5rX6ULgaJpZM4DraY->
.
|
How do we change this in the main alpaca.min.js script? |
You may edit the alpaca.js file, not the .min. file. |
Thank you @billbarsch you saved me! The code little bit changed now
In 2023 we have to edit two lines
to
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
When we submit default alpaca forms PHP receive data like that:
It's good but not so useful. Maybe we have to write a parser to read this like multidimentional php arrays.
But just "one line" change at this alpaca function:
If we change this line
from:
to:
The php receives data in a perfect multidimentional array, like that:
With data like that, we can easily apply the php function: json_encode($_POST);
And the json result is:
Is really extremely useful, and completly compatible with the alpaca way to think
Just one line! And the result is wonderful and amazing! (for php community)
obs: I know we can just use the javascript functions getData and send the perfect json to php using ajax and after parser, have the same result. But I don't know how ajax is working about uploading files. I think now it's a limitation until the new javascript files API came by default on all major browsers. But what I really know is: in that format we can work posting everything directly over html: <form action="" method="post"... and... SUBMIT!
The text was updated successfully, but these errors were encountered: