Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Make a form not active..... ??

LEGEND ,
Nov 10, 2008 Nov 10, 2008
Is there a way to make a <cfform> not active unless certain conditions are
met? Like say, someone is logged in???


335
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 10, 2008 Nov 10, 2008
put it inside a <cfif> block maybe? or do you still want to display it,
just make it non-functional? you could also make all form elements
disabled... actually just making the submit button disabled will be enough.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 10, 2008 Nov 10, 2008
Hello Azadi,

Yes, I still wanted to display the form fields.....

I could make all the form elements disabled, but that seems a bit odd ;)

I was hoping I could 'grey out' the form until it was active...... I could
disable the submit button as well, not a bad idea..... with a combination
of disabling the form fields, that way someone doesn't enter information
to then find out they can't submit the form.......



> put it inside a <cfif> block maybe? or do you still want to display
> it, just make it non-functional? you could also make all form elements
> disabled... actually just making the submit button disabled will be
> enough.
>
> Azadi Saryev
> Sabai-dee.com
> http://www.sabai-dee.com/


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 10, 2008 Nov 10, 2008
If possible, I would remove the form entirely until the condition is met - this way it would be more accessible and less annoying.

If you're going to disable the form, at least disable ALL of the fields, because the last thing I'd want to see when filling in a form, is the fact that I can't submit it. I would have spent so much time filling it out only to get annoyed....and since this would be done with CFML, it would probably indeed require a page refresh opf some kind to get them enabled again...unless you used AJAX or something I suppose...but then if you were gonna do that, you may aswell use JS entirely.

Just my thoughts!

Mikey.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 10, 2008 Nov 10, 2008
LATEST
yes, i would also not display the form at all unless the condition is
met - why even display a form to a user if he can't use it??? display a
note instead saying something like "please log in to [do whatever the
form does]".

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources