I would like to graft an existing php feedback form - which includes a file upload function - into a modx cms site.
Is this going to cause problems? i.e. will i be able to just copy the code into a new modx template, or do i need to use a more ’bespoke’ form product such as EFORM?
I would very much like to be able to use the existing form as time is very much of the essence.
For the record, the existing form is hosted on a server running php version 4.4.7 with reg_globals ON
thanks in advance
Hi, thanks for the speedy reply
I’m thinking that, because of time restrictions, i will need to keep the form outside of the cms in a separate directory, and hard-wire links to the form within the actual modx templates - this won’t be a problem for the client as they won’t need to change these link addresses.
I guess that I could use absolute url’s from within the cms templates to reach the form. However, I plan to apply friendly url’s to the site after it’s up and running and am a bit concerned about the route back to the cms pages from the form.
Does this all sound feasible to you - or a recipe for disaster???
thanks again
You obviously have a path in mind and technically that’s totally possible. I personally wouldn’t go down that path. Having to maintain a separate bit outside the CMS in the long run means more maintenance (as for example when you turn on friendly urls) and potentially trouble reintegrating the form into the cms at a later stage.
Yes, you may be able to do this to gain a bit of time now but ultimately you should integrate the form in my opinion.
What’s special about this form that it can’t be translated into a modx form in an hour or two?
I’d say that there’s nothing special about the form at all - 4 required text fields, 1 required comment box, and a file upload field/button.
I guess my concern is that, right now, I need to get the site up and running today(!) and will be converting the site into the cms over the next few days. I’ve never used EFORM - would you say that it can implement the above mentioned features? (i’d be surprised if it can’t) and that it is intuitive enough to be able to pick up quickly? I’m fairly adept at figuring out for myself, just rather rushed right now!
Oh, incidentally as per your earlier comment, reg_globals ON is not a requirement for what i’m doing, it’s just the setting of the clients’ host server (1and1) but forms work fine on their platform. Unfortunately I can’t change the settings.
thanks again
Quote from: rootsdiv at Oct 18, 2007, 07:36 AM
I’d say that there’s nothing special about the form at all - 4 required text fields, 1 required comment box, and a file upload field/button.
I guess my concern is that, right now, I need to get the site up and running today(!) and will be converting the site into the cms over the next few days. I’ve never used EFORM - would you say that it can implement the above mentioned features? (i’d be surprised if it can’t) and that it is intuitive enough to be able to pick up quickly? I’m fairly adept at figuring out for myself, just rather rushed right now!
Not to speak against eForm, but if your current form is all on one page and posts to itself, you may be able to just paste it into a new snippet, adjust the file paths (make the form action the name of the document containing the snippet call) and put that snippet call on a page.
If the current stuff is on separate pages, you need to create separate snippets and place them on separate pages.
In either case, if you’re in a hurry, it will probably be faster to hard code all the file paths. Just don’t forget to clean everything up later when you have more time
Then you could work on porting it to eForm or another solution later.
Bob