Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2011-04-07 00:14:57

Steffan
New member
Registered: 2011-04-06
Posts: 4

Form elements without a form

I am looking to use Xinha to create forms BUT I do not want the user to create the actual <form element itself. The html will be stored in a table and displayed at a later time. I will create the <form and put in all the Xinha generated html into the form and then parse the response on another page. When looking at the demos, you have to create the form FIRST before you can drop in elements. Is there any way to work around this?

Thanks,
Steffan

Offline

#2 2011-04-08 00:04:54

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Form elements without a form

Editing of forms in Xinha has not been looked at in many years, at least not by me.  Frankly, I would not recommend it, in so far as I remember there were too many issues in Firefox particularly with regard to selecting form elements inside Xinha to make it practical.


James Sleeman

Offline

#3 2011-04-08 01:28:19

Steffan
New member
Registered: 2011-04-06
Posts: 4

Re: Form elements without a form

From what I can tell by testing, the forms seem to work fine in FF its just a matter of not having to use the form button/element first.

Offline

#4 2011-04-08 09:12:27

ejucovy
Xinha Community Member
From: NY
Registered: 2010-11-15
Posts: 35
Website

Re: Form elements without a form

Can you work around it on the server side by parsing the HTML that's sent and just removing the <form element that's generated in the Xinha content?

Offline

#5 2011-04-08 09:56:23

Steffan
New member
Registered: 2011-04-06
Posts: 4

Re: Form elements without a form

Yes, that's a possibility but far less elegant. I want to minimize the understanding of html as much as possible. I guess I'll have to hack at the code to find the section that disables the buttons until the form is on the page. There are specific reasons for the way of doing this that would take some explanation but I guess that's best saved if I can't figure it out.

Of all the wysiwyg editors I have looked at including CKEditor, this is the only one that currently supports forms and works in all browsers I've tested.

Funny thing, this is the most I've received at all. CKEditor doesn't have a file upload input. I tried writing a plugin for it. I posted on a couple different forums and not one single reply. This is the most I've had on the subject.

Well, time to dig into the nitty gritty of the code to see if it can be changed.

Offline

#6 2011-04-08 19:57:18

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Form elements without a form

Which form editing plugin are you using?  A quick look at tmy (ancient)  FormOperations code doesn't show anything that would disable the plugin if there is no form.  To me, it looks like it should work fine.


James Sleeman

Offline

#7 2011-04-08 22:13:21

Steffan
New member
Registered: 2011-04-06
Posts: 4

Re: Form elements without a form

I was looking at the demo on the site. I checked the forms checkbox on the left and then the reload button at the bottom. When the editor initially loads, the form inputs are grayed out and disabled until you place an actual form in the editor first.

On another note, how hard is it to add additional fields in the dialogs for the inputs like a checkbox for "required" which will add a class="required" etc to the elements? The purpose is that the page rendering this html within a form will use jQuery validation to ensure the data conforms.

Thanks for the responses!

Offline

#8 2011-04-09 07:59:35

ejucovy
Xinha Community Member
From: NY
Registered: 2010-11-15
Posts: 35
Website

Re: Form elements without a form

Pretty sure that should be an easy change to make, you'll just need to add some code to the right popup/*.html files as well as modifying Forms.js too.

Offline

Board footer

Powered by FluxBB