Customer Portal

Get Involved. Join the Conversation.


    Christopher Farmer
    'Illegal Parameter' when adding i_id to...
    Topic posted November 16, 2010 by Christopher FarmerGold Medal: 3,500+ Points, last edited October 29, 2011 
    1214 Views, 1 Comment
    'Illegal Parameter' when adding i_id to on_success_url

    Hi all,

    I'm attempting to append an incident ID to the 'on_success_url' property of a custom widget, which is 99% identical to the input/FormSubmit widget.

    Once the user has uploaded one or more documents on page1, I wish to then provide them with an overview of the documents that are attached to their incident on page2 and to do this I believe I need to include the ID of the incident to which these documents are attached (please correct me if I am wrong here) in page2's URL.

    I've used a hidden input field to store the incident ID, which is retrieved from the URL using 'getUrlParm('i_id')', on page1. This is then written to the 'i_id' attribute where my custom widget is specified on page1 using JavaScript. I found that I could not include PHP code when specifying the 'on_success_url' in the standard input/FormSubmit widget, so had to go down this route. Again, please let me know if there is a better way to do this.

    I've successfully managed to retrieve the i_id within the controller, and have appended it to the end of the 'on_success_url' using urlParmAdd. I've output it in the view and I am sure the format looks correct:


    Yet when I then click the submit button in this form, I am presented with a page with the error message 'Illegal Parameter'. When I manually append the literal value 261 to the end of the 'on_success_url' property and try submitting the form, the documents that are attached to the incident are displayed as expected by the widget, even though the format of the URL is the same each time.

    I found some code in the '_formSubmitResponse' function of the logic file, which seems to be manipulating the URL in some way, though I can't work out what's going on. Perhaps this is causing the problem?

    Any suggestions/help/observations would be much appreciated.





    • brett bukowski

      If I'm understanding your use-case and flow correctly, I believe you should be able to use the standard, non-customized FormSubmit widget:

      <rn:widget path="input/FormSubmit" on_success_url="/app/.../page2/i_id/#rn:php:getUrlParm('i_id')#" />

      That will correctly persist the i_id parameter onto the next page.