Debugging FORM input fields for CFC

I wonder if anyone has some idea as to debug/output ALL the FORM input fields during a CFC form submission. We have to eliminate the handy in this case.

something like this?

		if (structKeyExists(FORM, "send")) {

	<form method="post">
		<input type="text" name="fullname" placeholder="Full Name" />
		<input type="email" name="email" placeholder="Email" />
		<input type="url" name="website" placeholder="Website" />
		<textarea placeholder="message" name="Message"></textarea>
		<input type="submit" name="send" value="Send Message" />

Good to know, Evan, thank you.

You can also check instead:

1 Like

I like your solution! Thank you! :raised_hands:


Thanks. Actually, you can also do it this way which can save a few keystrokes:

if (!isEmpty(Form))

The only downside of this one is that if you added any keys to the Form scope then it will not be empty anymore and the Form scope will be dump. e.g.

param name="Form.anything" default="";  // Form is not empty anymore
1 Like