budove58 Posted October 29, 2013 Share Posted October 29, 2013 (edited) I created this code this morning and I think I have it right but not sure because I'm getting an error. The error is related to Oracle's RightNow CX so I'm not sure if it's my code, or if something RightNow is not allowing for some reason. Here is the code... <!-- *** Citation Form 1 *** --> <div id="anotherCitNum" style="float:left;"> <!-- Widget: Text Input for Citation Number --> <rn:widget path="standard/input/FormInput" name="incidents.c$citationnumber1" label_input="Citation Number:" /> </div> <div id="anotherCitDate" style="float:left; padding-left:15px"> <!-- Widget: Date Selection for Citation --> <rn:widget path="standard/input/DateInput" name="incidents.c$citationissuedate1" label_input="Citation Date:" /> </div> <br clear="all"/><br /> <?php $citcount = array_fill(2, 9, array_fill(2, 9, 0)); $citationform = '<!-- *** Citation Form '.$citnum.'*** --> <details> <summary>Enter another citation</summary><br /> <div id="anotherCitNum" style="float:left;"> <!-- Widget: Text Input for Citation Number --> <rn:widget path="standard/input/FormInput" name="incidents.c$citationnumber'.$citnum.'" label_input="Citation Number:" /> </div> <div id="anotherCitDate" style="float:left; padding-left:15px"> <!-- Widget: Date Selection for Citation --> <rn:widget path="standard/input/DateInput" name="incidents.c$citationissuedate'.$citnum.'" label_input="Citation Date:" /> </div> <br clear="all"/><br />'; foreach ($citcount as $citnum) { echo $citationform; } ?> </details> </details> </details> </details> </details> </details> </details> </details> </details> <br style="clear:all;"/><br /> Here is the error I'm getting... Parse error: syntax error, unexpected T_STRING in g/scripts/euf/application/rightnow/optimized_includes.php(180) : eval()'d code on line 25 If there's no problem with my code, then I'll assume it's something in RightNow. This is my first attempt at a Custom Widget so any help would be appreciated. Edited October 29, 2013 by budove58 Quote Link to comment Share on other sites More sharing options...
budove58 Posted October 29, 2013 Author Share Posted October 29, 2013 It works just fine in HTML, I'm just trying to condense the code by using PHP. Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted October 29, 2013 Share Posted October 29, 2013 the posted code doesn't produce that error. i'm betting there's something in lines 1-7, such as a string that isn't terminated that is causing the error. Quote Link to comment Share on other sites More sharing options...
budove58 Posted October 29, 2013 Author Share Posted October 29, 2013 Here are lines 1-7... <?php /* Originating Release: May 2012 */ ?> <rn:meta controller_path="standard/input/FormInput" base_css="custom/input/Citations" compatibility_set="November '09+" required_js_module="november_09,mobile_may_10"/> This is a RightNow Widget so I'm wondering if something I'm trying to do has been restricted by the framework. Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted October 29, 2013 Share Posted October 29, 2013 (edited) since the code is being eval()'ed, it cannot start with an opening php tag (throws a different error from the one you are getting.) the full code you have posted doesn't produce the original error when eval()'ed. the only general php help that comes to mind is your actual code contains something like a smart/curly-quote that is being changed to a straight-quote by this forum's software. you could zip the code and upload/attach it to a post. there is a rightnow forum that could give targeted/specific help - http://communities.rightnow.com about the only other thing that comes to mind is if you post the original logic from the file (assuming it contains any php code at all) so that someone here could see the expected usage. Edited October 29, 2013 by mac_gyver Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.