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

Dynamic Forms (Data Dictionary) using CFForm (??)

Explorer ,
Jul 04, 2007 Jul 04, 2007

Copy link to clipboard

Copied

Hi,

The basic plan is to build the forms in my application dynamically using a data dictionary rather than basing them upon static tables and having statically coded forms to match. This would allow me to offer the ability for an administrator to add new fields if required (client 'requirements' are hard to pin down and may therefore change).

I'm developing using CF8 (hoping it will be released real soon..;-).). Application will be structured using Fusebox 5.

I've tried building up the form elements (<cfinput> & etc) off in CFC, returning the layout result code in a content variable, and its not working.
I have some other approaches to try, but this one would be preferable.

Has anyone else tried this - and do you have any advice to offer (or am I just crazy trying it because there is no way its going to work ?)

Thanks
Bryn50
TOPICS
Advanced techniques

Views

600

Translate

Translate

Report

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

correct answers 1 Correct answer

Contributor , Jul 05, 2007 Jul 05, 2007
Fair enough, I guess there are some benefits in using cfform, although I'm not a huge fan of flash forms..

I noticed in another discussion on this topic HERE that BKBK suggested using a custom tag to achieve this functionality.

I haven't tried this myself but it might be worth a look.

cheers

Votes

Translate

Translate
Contributor ,
Jul 04, 2007 Jul 04, 2007

Copy link to clipboard

Copied

I've noticed a few discussions about this problem, most recently in This Thread

Do you have to use the <cfform> tag or could you get away with just using <form> instead? That would certainly solve your problem.

Personally I never use cfform, I prefer to write my own validation code to give me better control and also cut down on code that cfform adds that I don't necessarily need.

cheers

Votes

Translate

Translate

Report

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
Explorer ,
Jul 05, 2007 Jul 05, 2007

Copy link to clipboard

Copied

This approach works well using standard html forms and html form controls such as <input> and <select> etc.

I'm wanting to use CFFORM (for the first time in a long time) for the functionality on offer (such as flash forms).
As I saw elsewhere, I have not used this in a verrry long time because generally I've found it inflexible and the validation on offer is a tiny subset of what is generally needed. I'm kinda hoping to be able to overcome that this time around by adding my own javascript validation when necessary.

I have some ideas for approaches that might work, but they don't seem like very good ones to me:
1/. might be to try using standard html form controls inside a cfform. Can I still have it display using flash ?
2/. might be to have all of the logic that selects the appropriate cfform control for a given field in the same file as the cfform, however that seems so unelegant and also it defies the MVC/fusebox 5 approach I'm also wanting to use.

Thanks for your help...
Cheers,
...

Votes

Translate

Translate

Report

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
Contributor ,
Jul 05, 2007 Jul 05, 2007

Copy link to clipboard

Copied

Fair enough, I guess there are some benefits in using cfform, although I'm not a huge fan of flash forms..

I noticed in another discussion on this topic HERE that BKBK suggested using a custom tag to achieve this functionality.

I haven't tried this myself but it might be worth a look.

cheers

Votes

Translate

Translate

Report

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
Explorer ,
Jul 06, 2007 Jul 06, 2007

Copy link to clipboard

Copied

LATEST
Thanks for that.

BKBK had the answer all right, this does work when using a good old custom tag. Not the most elegant solution, but it will work, and avoid having a bunch of ugly control logic in my display form.

Cheers,

Votes

Translate

Translate

Report

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 ,
Jul 05, 2007 Jul 05, 2007

Copy link to clipboard

Copied

Regarding, "Has anyone else tried this - and do you have any advice to offer (or am I just crazy trying it because there is no way its going to work ?)"

I have never tried it. You are not crazy, you are ambitious.

Regarding, "1/. might be to try using standard html form controls inside a cfform. Can I still have it display using flash ?"
no

Regarding the general nature of your questions, I don't understand them.

Votes

Translate

Translate

Report

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
Documentation