Jump to content

How to validate FCK Editor?


shah_ankitb
 Share

Recommended Posts

Any Body Know's how to validate FCK Editor means Suppose on one page I have FCK Editor, below that one Submit button Called 'Submit Data'. When I Click On the 'Submit Data' button & if the FCK Editor has no data / Input then It Displays the message that like 'Plese Enter Data'.

Link to comment
Share on other sites

you will need to use the trim() function on the string to remove surrounding whitespace in case they just entered a bunch of spaces, then you use the empty() function in an if statement perhaps to check if it is empty, if it is then you either end the script and print the error (exit() or die() function to end the script), otherwise you continue.I'll let you code it so you know how to do it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...