I have an orbeon form built and would like to call the form in Drupal using PHP. I have a module and curl'd the Orbeon API and the form comes back but it is displaying everything such the the errors and data validation. When I just call the API in the browser the form looks fine.
Here's my PHP module code: $ch = curl_init(); $headers = array( "Authorization: Bearer MyTokenHere", ); curl_setopt_array($ch, array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_HTTPHEADER => $headers, CURLOPT_URL => "<a href="http://myip:port/orbeon/fr/EmployeeSearch/employeesearch/new">http://myip:port/orbeon/fr/EmployeeSearch/employeesearch/new" )); $response = curl_exec($ch); curl_close($ch); $form['results'] = array('#markup' => t($response)); return $form; Thanks Dennis |
Administrator
|
Hi Dennis,
The value of CURLOPT_URL would need to be the URL, not the HTML anchor (<a href="…). I looks to me like you're trying to include a form in a page; this is possible, but can be complicated, as you would also need to proxy requests to Orbeon Forms appropriately (Ajax requests, POSTs) alls of this making sure the headers are proxied correctly. Instead, wouldn't it be possible to just link to that URL, so users' browser hit the URL of the server on which Orbeon Forms run directly? Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Thank you for getting back with me. I did get it to work but the problem is that the Form sits on a different server than the web application, so it is not calling the .js or .css. Attached is our website and source code. If I could just change how it is referenced the page would probably render fine. Thanks Dennis On Sun, Aug 11, 2013 at 1:34 PM, Alessandro Vernet [via Orbeon Forms community mailing list] <[hidden email]> wrote: Hi Dennis, |
In reply to this post by Alessandro Vernet
Also, we are trying to use it as a form within a page. for example: insert the orbeon form on a page for an employee search and the search would be the Orbeon form and try to capture the results on return and put that on the page. Would that even be possible? I'm trying to do a proof of concept. We would like to use Orbeon to keep from having to constantly write the same process multiple times. Thanks Dennis On Mon, Aug 12, 2013 at 7:09 AM, Dennis Tucker <[hidden email]> wrote:
|
In reply to this post by Alessandro Vernet
How would I accomplish the Orbeon form to include the absolute path? Right now it returns href="<a href="view-source:http://localhost/orbeon/xforms-server/3cff16aa5c95782a73669957df3fbce5c051eee7/orbeon-0f68c6c7df55d5746bbb48a0c5b3ffe44523795c.css" class="">/orbeon/xforms-server/3cff16aa5c95782a73669957df3fbce5c051eee7/orbeon-0f68c6c7df55d5746bbb48a0c5b3ffe44523795c.css
I would like it to return href="http://devservorprodserver<a href="view-source:http://localhost/orbeon/xforms-server/3cff16aa5c95782a73669957df3fbce5c051eee7/orbeon-0f68c6c7df55d5746bbb48a0c5b3ffe44523795c.css" class="">/orbeon/xforms-server/3cff16aa5c95782a73669957df3fbce5c051eee7/orbeon-0f68c6c7df55d5746bbb48a0c5b3ffe44523795c.css Thanks Dennis On Mon, Aug 12, 2013 at 7:33 AM, Dennis Tucker <[hidden email]> wrote:
|
Administrator
|
Hi Dennis,
We can't help you much with this here, as it isn't a simple issue but more of an integration project. We did this in 2008 for TYPO3 and this code was written in PHP, if your team knows the ins-and-outs of HTTP and how proxies work, this is maybe something they can find useful: http://typo3.org/extension-manuals/orbeon/0.0.1/view/1/2/ Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Administrator
|
We have also some information which might be useful here:
http://wiki.orbeon.com/forms/doc/contributor-guide/proxying-orbeon-forms -Erik On Fri, Aug 16, 2013 at 7:08 AM, Alessandro Vernet <[hidden email]> wrote: > Hi Dennis, > > We can't help you much with this here, as it isn't a simple issue but more > of an integration project. We did this in 2008 for TYPO3 and this code was > written in PHP, if your team knows the ins-and-outs of HTTP and how proxies > work, this is maybe something they can find useful: > > http://typo3.org/extension-manuals/orbeon/0.0.1/view/1/2/ > > Alex > > ----- > -- > Follow Orbeon on Twitter: @orbeon > Follow me on Twitter: @avernet > -- > View this message in context: http://discuss.orbeon.com/PHP-Orbeon-form-display-tp4657130p4657175.html > Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com. > > -- > You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. > To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. > To post to this group, send email to [hidden email]. -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Free forum by Nabble | Edit this page |