Link to home
Start Free TrialLog in
Avatar of dawes4000
dawes4000Flag for United States of America

asked on

Can I just copy the CFIDE folder to the directory that contains the website?

I am running a number of websites and have found that in order to get the "required" method to work in a cfinput I need to have the CFIDE folder in the same directory. I have attempted to write a script on the page, which uses the required method, that points to the location of the CFIDE in wwwroot but it dossn't work

currently the CFIDE is here:

wwwroot
   CFIDE
   website1
   website2
   website3

The map below works but seems memory intensive:
   website1
         CFIDE
   website2
         CFIDE
   website3
         CFIDE


Avatar of dgrafx
dgrafx
Flag of United States of America image

You shouldn't need to have CFIDE in a website directory
What exactly are you trying to do?
What is the "required method" you refer to?
Avatar of dawes4000

ASKER

<cfform name="form1" method="post" action="webform.cfm">
   <cfinput name="item1" type="text" required="yes" message="cannot be blank">
   <cfinput name="btnSubmit" type="submit" value="Submit">
</cffrom>

"required" does not work unless CFIDE folder is located in the same directory as the web form.
This structure works:
wwwroot
  website1
         CFIDE
   website2
         CFIDE
   website3
         CFIDE

This structure does not work.
wwwroot
   CFIDE
   website1
   website2
   website3




this shouldn't be.
I've never heard of someone having to do this.
You can have several sites running on the same server - each with their own cf forms with required and whatever else - and just the one cfide directory.
I'm wondering how you came to start copying cfide to each website.
I'd say there is something wrong with your install ...
or website structure.

Where is your default server root? wwwroot?
is default site running?
if not - turn it on and see if that makes a difference - I'm just grabbing at straws - don't know if that means anything ...
I am equally puzzled. I have other sites that are working with the CFIDE in wwwroot. and other sites that are not and require the CFIDE within the particular sites directory. I read on this forum someone had a similar problem. Their "required" field was not working, and it was suggested to put their directory within the CFIDE folder. this clued me into the fact that the CFIDE is a pre-requisuite for cfform.js scripts, duh. So, I simply thought well I'll copy CFIDE into the sites directory rather than the site into the CFIDE, and wala it worked. Go figure, its very quirky. So I'm here looking for answers. I would rather not have to have multiple instances of the CFIDE.
I guess I can't advise any further other than reinstall cf after you've removed the dup cfide's
sorry
Dawes4000 - cfide is required for the use of cfform due to the built in scripts and stuff that are required by CF to do the validation and other features of cfform.

If you copy the cfide directory then you will run into problems, especaially when you upgrade as you will have to set it all up on every site you have.

A much prefered method is to put a virtual directory to the original cfide directory from the root of your site. This will allow you to manage only one folder and cf will only have to use the one set of files.
dawes4000,

Yes as mmc says CFIDE is needed for some things, using a virtual directory under IIS is the best option.

The reason everyone else doesn't have this problem, is they probably don't use the <CFFORM stuff, I know we don't.

Regards
Plucka
it is also required for some of the flash intergration bits, such as flashpaper and pdf with cfdocument.

We dont use cfform either, its better than it was, but still not enough control - I think its neat but cant be used on every form in an app. Thats what Flex is for!
mmc98dl1 what do you mean exactly "virtual directory to the original cfide directory from the root of your site?"
I'm aware that CFIDE should be in the wwwroot at the same level of other website directories, some of my sites do not see it that way, that the issue.

Flex is not an option. Too expensive for the company to purchase the IDE. How else can the form work if not using cfform? Using plain html form tags does not give me the "required" method and javascript can be cross-browswer incompatible. With cfform.js at least I have proven script on all platforms.
Are you using IIS?

What I mean by a virtual directory is that CF installs cfide to c:\inetpub\wwwroot\cfide

You create a virtual directory in IIS called cfide and point it to c:\inetpub\wwwroot\cfide . This in effect imports cfide to the site you created the directory for and allows you to maintain only one copy of it.

Regarding the use of cfform its a matter of preference and the type of application you are building - I am running a multinational enterprise app and cfform gets far too limiting, so we dont use it.
mmc98dl1,
I added a directory CFIDE in IIS, pointed it to the CFIDE installed at c:\inetpub\wwwroot\cfide and gave it the host header name of cf. This did not work.
ASKER CERTIFIED SOLUTION
Avatar of usachrisk1983
usachrisk1983
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JeffHowden
JeffHowden

Also, it's not clear from usachrisk1983's instructions, but you need to name each of the virtual directories cfide in order for it to work as expected.
mmc98dl1 was correct in his statements as well.
These are the steps taken:
in IIS right click the site "mysite"
select NEW -> Virtual Directory, then
give the new virtual directory a name and
enter a path, which is /wwwroot/CFIDE

mmc98dl1 diserves credit as well, thanks
Very kind of you Dawes4000 - you can request a points adjustment by posting in community support