Include line feed in xpath text field

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Include line feed in xpath text field

mepknapp
I have a number of nodes I want to reference and concatenate together and place them on different lines when displayed.   concat(stu-name,stu-id) displays both fields fine.  I want them to display on different lines though.  I have unsucessfully tried \n, <br/>, chr(10), hex representation and at least 4 other representations to no avail (ex:  concat(stu-name,'\n',stu-id) ).  

This reference has been created on the 'Database service' option in Form builder,
under the 'Set Response Control Values' section, with the destination control set to a text output object.
Reply | Threaded
Open this post in threaded view
|

Re: Include line feed in xpath text field

Alessandro  Vernet
Administrator
Hi Mary,

Are you saying that you'd like the concatenated values to be shown as the value of a Text output control? I am afraid there is no easy way to do this. You could use a Formatted Text control, and set its calculated value to concat($stu-name,  '<br/>', $stu-id). But only use this if you're sure that $stu-name and $stu-id cannot be entered by end users, otherwise this can open the door to injections.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Include line feed in xpath text field

mepknapp
Hi Alex,

Yes - It is being referenced in the Action Editor under the 'Set Response Control Values'.  It is the Source XPath expression where this is being referenced.

I have tried '<br/>' as well as /n, \n, chr(10), &#xA and numerous others to no avail.

Thanks
Mary



-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Alessandro Vernet
Sent: Saturday, January 11, 2014 2:11 AM
To: [hidden email]
Subject: [orbeon] Re: Include line feed in xpath text field

Hi Mary,

Are you saying that you'd like the concatenated values to be shown as the value of a Text output control? I am afraid there is no easy way to do this.
You could use a Formatted Text control, and set its calculated value to concat($stu-name,  '<br/>', $stu-id). But only use this if you're sure that $stu-name and $stu-id cannot be entered by end users, otherwise this can open the door to injections.

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
View this message in context: http://discuss.orbeon.com/Include-line-feed-in-xpath-text-field-tp4657837p4657845.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].