views:

120

answers:

1

I have added FCK Editor in my project. In that user can able to create a form with the controls provided in FCK At last the project will be shown to the customers they don't have any idea about HTML.So they might enter the same name for all the controls? while saving source of a FCK Editor once all form creation is done into the Database i need to validate those "names" of controls.

Please help me how to validate the control itself in FCK?

Thanks in advance,

krishnakumar S

A: 

Hi. Since CKEditor will output HTML, your best bet for validating this HTML is to use an HTML parser. Which scripting language do you use? If PHP, I recommend Simple HTML DOM. If Ruby, hpricot seems to work fine.

Using a parser will allow you to deeply and (hopefully) safely examine your forms. Do be aware, however, that the HTML output generated by CK (and other wysiwyg editors) will often be quite verbose and messy.

jkndrkn