HTML In Form Builder

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

HTML In Form Builder

Aaron Spike
If I can get sufficient direction, I would like to attempt to add more HTML support to Form Builder. This is something that I've felt the need for as I've been evaluating Orbeon Forms and I see numerous related questions and issues online. For example:

http://stackoverflow.com/questions/8728470/what-is-the-easiest-way-to-add-additional-html-to-my-form-using-the-orbeon-form
https://github.com/orbeon/orbeon-forms/issues/618
http://discuss.orbeon.com/Embed-html-in-xforms-output-td3056988.html

Ideally I would like to enable HTML in the Form description and also create WYSIWYG HTML element that could be embedded in any grid cell where needed.

Aaron Spike

This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College.

--
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].
Reply | Threaded
Open this post in threaded view
|

Re: HTML In Form Builder

Alessandro  Vernet
Administrator
Hi Aaron,

HTML in help messages for controls is implemented since 4.4. I updated the answer on Stack Overflow, and closed #618 to reflect that.

http://stackoverflow.com/questions/8728470/what-is-the-easiest-way-to-add-additional-html-to-my-form-using-the-orbeon-form
https://github.com/orbeon/orbeon-forms/issues/618

As far as a control allowing form authors to enter HTML (in Form Builder), I had started building a component for this, but didn't get a chance to finish that work. Let me know if you'd like to pick that up, and I can send you the code I have so far.

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

Re: HTML In Form Builder

Aaron Spike


On Monday, October 13, 2014 1:35:11 PM UTC-5, Alessandro Vernet wrote:
Hi Aaron,

HTML in help messages for controls is implemented since 4.4. I updated the
answer on Stack Overflow, and closed #618 to reflect that.

<a href="http://stackoverflow.com/questions/8728470/what-is-the-easiest-way-to-add-additional-html-to-my-form-using-the-orbeon-form" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fstackoverflow.com%2Fquestions%2F8728470%2Fwhat-is-the-easiest-way-to-add-additional-html-to-my-form-using-the-orbeon-form\46sa\75D\46sntz\0751\46usg\75AFQjCNHAS5atH1mayazd9F7AsS5dFe0LSQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fstackoverflow.com%2Fquestions%2F8728470%2Fwhat-is-the-easiest-way-to-add-additional-html-to-my-form-using-the-orbeon-form\46sa\75D\46sntz\0751\46usg\75AFQjCNHAS5atH1mayazd9F7AsS5dFe0LSQ';return true;">http://stackoverflow.com/questions/8728470/what-is-the-easiest-way-to-add-additional-html-to-my-form-using-the-orbeon-form
<a href="https://github.com/orbeon/orbeon-forms/issues/618" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Forbeon%2Forbeon-forms%2Fissues%2F618\46sa\75D\46sntz\0751\46usg\75AFQjCNHawRivr7OnhwRLnGZZfbLfPIcnKw';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Forbeon%2Forbeon-forms%2Fissues%2F618\46sa\75D\46sntz\0751\46usg\75AFQjCNHawRivr7OnhwRLnGZZfbLfPIcnKw';return true;">https://github.com/orbeon/orbeon-forms/issues/618
 
For control help, yes. But not for the Form Description as far as I can tell. And without WYSIWYG.
 
As far as a control allowing form authors to enter HTML (in Form Builder), I
had started building a component for this, but didn't get a chance to finish
that work. Let me know if you'd like to pick that up, and I can send you the
code I have so far.

That could be helpful, at the very least for determining if I could grasp the scope of the necessary changes. Just to be clear, are we talking about a component to provide WYSIWYG editing for help fields? Or are we talking about a new component to add arbitrary HTML to the form for additional explanation and formatting?

 

This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College.

--
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].
Reply | Threaded
Open this post in threaded view
|

Re: HTML In Form Builder

Aaron Spike
Ok, I see the WYSIWYG editor in control help.

I re-read the issue you linked to and see that we're talking about arbitrary html on the form. I think that will accomplish everything I need, so there is no need to implement WYSIWYG for the form descriptions. Could you point me to the branch with your work and I'll see if I can figure it out?

This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College.

--
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].
Reply | Threaded
Open this post in threaded view
|

Re: HTML In Form Builder

Aaron Spike
Perhaps it isn't in a branch but simply disabled in HEAD?

https://github.com/orbeon/orbeon-forms/commit/8bceecfbf62418680f4ad2537a9029aafdb38d28?diff=unified

https://github.com/orbeon/orbeon-forms/blob/master/src/resources-packaged/xbl/orbeon/explanation/explanation.xbl

If this is the correct code, can you provide an overview of what needs to happen for it to be properly functional?

This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College.

--
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].
Reply | Threaded
Open this post in threaded view
|

Re: HTML In Form Builder

Alessandro  Vernet
Administrator
Hi Aaron,

Correct, it is that explanation.xbl. I thought I had this on a local branch, but it is in fact checked in, just not referenced from anywhere.

Most of the work that was done so far wasn't in the XBL code, but in the Scala code, to generalize the concept LHHA (label, hint, help, alert) and allow controls to have other resources, in this case one called "text". Now, if memory serves, the missing part is to allow the client-side code to handle that text control. This is done in Form Builder client-side, written in CoffeeScript, and which you can find here:

https://github.com/orbeon/orbeon-forms/tree/master/src/resources/forms/orbeon/builder/resources/cell/control-resources-editor

This code handles LHHA, and I apparently had started changing it to handle "text" resources, but it doesn't seem to be fully working. So this would need to be figured out.

If you want to test this, just add this property to your properties-local.xml, which will add the explanation control to the toolbox.

    <property as="xs:string"  name="oxf.fb.toolbox.group.text.uri.*.*">
        oxf:/forms/orbeon/builder/xbl/text-controls.xbl
        oxf:/xbl/orbeon/explanation/explanation.xbl
        oxf:/xbl/orbeon/tinymce/tinymce.xbl
    </property> 

This is a brutal place to start looking at our code, as it involves lots of different pieces. But if you feel like exploring, go ahead, a feel free to ask questions; we'll do our best to help!

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

Re: HTML In Form Builder

Aaron Spike


On Tuesday, October 21, 2014 11:40:25 PM UTC-5, Alessandro Vernet wrote:

This is a brutal place to start looking at our code, as it involves lots of
different pieces. But if you feel like exploring, go ahead, a feel free to
ask questions; we'll do our best to help!


From my vantage point it is all brutal.

Aaron Spike 

This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College.

--
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].
Reply | Threaded
Open this post in threaded view
|

Re: HTML In Form Builder

Alessandro  Vernet
Administrator
Aaron Spike wrote
From my vantage point it is all brutal.
On the upside, when done, in the process, you'll have become an expert in Scala and CoffeeScript ;).

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

Re: HTML In Form Builder

Aaron Spike
I've stared at this for a while now and I don't think I'm getting any closer to understanding it. If you are willing, please make another attempt at explaining what needs to be done to get a control to display arbitrary html on the form.

I'm also a little confused about why this ties into LHHA. Is the intent that all controls would support this not just a particular control created for this purpose?

Aaron Spike

This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College.

--
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].
Reply | Threaded
Open this post in threaded view
|

Re: HTML In Form Builder

Aaron Spike
I've made a little progress on this. My branch now seems to work well enough to use, but there is a bug when unchecking the isHtml box. (and there is no WYSIWYG widget)

Changes in my branch:
https://github.com/martinluther/orbeon-forms/compare/issue507

Discussion on the issue:
https://github.com/orbeon/orbeon-forms/issues/507

As always, pointers welcome.

Aaron Spike

This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College.

--
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].
Reply | Threaded
Open this post in threaded view
|

Re: HTML In Form Builder

Aaron Spike
I've submitted a pull request for this branch now.

https://github.com/orbeon/orbeon-forms/pull/2025


This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College.

--
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].
Reply | Threaded
Open this post in threaded view
|

Re: HTML In Form Builder

Alessandro  Vernet
Administrator
We've already discussed this on Twitter, but for those who find this thread through a search, the plan is to look into and merge this pull request after we've released 4.8. And Aaron, thank you for the contribution, and for your patience!

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

Re: HTML In Form Builder

Aaron Spike
And thank you for being patient with my ignorance and my never ending stream of questions!

This electronic communication, including any attached documents, may contain confidential and/or legally privileged information that is intended only for use by the recipient(s) named above. If you have received this communication in error, please notify the sender immediately and delete the communication and any attachments. Views expressed by the author do not necessarily represent those of Martin Luther College.

--
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].