Problem with form formatting

1 view
Skip to first unread message

ComboFusion

unread,
Aug 19, 2010, 10:50:07 PM8/19/10
to ColdFusion on Wheels
Hi people. I am going nuts with a problem that I am having. I have
just installed the CF on Wheels Framework and I've been enjoying some
very nice screen-casts on the official site of Wheels. I just love
Wheels as a Framework, but unfortunately I came across a problem.

Here is the problem I am having. Under there's the explanation, but if
you prefer a better layout, then check out the original post:
http://www.dreamincode.net/forums/topic/186929-wheels-problem-with-formatting-forms/

I am trying to format some text fields in a form, as explained in this
screencast: http://cfwheels.org/screencasts/view/7

I do everything exactly as the instructor in the video says: in the
config/settings.cfm file I write this:

<cfset set(functionName="textField", labelPlacement="before",
prependToLabel="<div>", append = "</div>", appendToLabel = "<br />")>

But when I refresh the website and check the HTML code "under the
hood", it looks like that:

<div><label for="user-firstName" placement="before">First Name<input
id="user-firstName" type="text" value="" name="user[firstName]" /></
div></label><br />

Do you notice the where the problem is? The tags </label><br /> should
have been automatically placed right after the label text "First
Name"! Instead they are being placed right at the end of the code
(behind the </div> tag)! Also I am not sure what is the
placement="before" option doing within the <label> tag!

The result I should get is this (like in the screencast, on time
2:50):

<div><label for="user-firstName">First Name</label><br /><input
id="user-firstName" type="text" value="" name="user[firstName]" /></
div>

Does anyone have a clue of what is wrong here?

Thank you so much in advance for your help.

Chris Peters

unread,
Aug 19, 2010, 11:06:13 PM8/19/10
to cfwh...@googlegroups.com
When you change something in config, you need to issue a reload of the app settings by clicking the reload link in the footer or by putting ?reload=true at the end of the URL. Did you try that?

I know you mention r"efreshing the website," but I don't want to make assumptions on what you meant.

Glad that Wheels looks promising to you so far. Be sure to search thus group and ask questions if you need more help!

- The Instructor ;)

-----
Sent from my mobile.

> --
> You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
> To post to this group, send email to cfwh...@googlegroups.com.
> To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.
>

ComboFusion

unread,
Aug 19, 2010, 11:52:54 PM8/19/10
to ColdFusion on Wheels
Thank you Chris for your fast response. Sorry for the "instructor"
thing. :) I have been working all night and I am very tired. :) My
comments are between the paragraphs you wrote...

> When you change something in config, you need to issue a reload of the app settings by clicking the reload link in the footer or by putting ?reload=true at the end of the URL. Did you try that?

As you can see in this screen cast I just made (http://screenr.com/
zq0), you can see that I don't have the same layout as you do in the
video. There is no refresh button. What the heck am I missing here?
Sorry for no sound in the screencast... my microphone is broken! :/

> I know you mention "refreshing the website," but I don't want to make assumptions on what you meant.

I refreshed by literally clearing the cache in the URL. Like this:
http://localhost:8500/cfprojects/wheels/index.cfm?reload=true. BTW,
here I wonder, why I cannot simply write like this:
http://localhost:8500/cfprojects/wheels/?reload=true ? It simply does
not work. Also i don't understand, why do I sometimes get this type of
address in the url: /cfprojects/wheels/index.cfm?
controller=user&action=create ? As I saw in your screencast, you
always had the more friendly type.

> Glad that Wheels looks promising to you so far. Be sure to search thus group and ask questions if you need more help!

Thank you I definitely will seek through. I also look forward solving
this small problem and go along with your screencasts.

ComboFusion

unread,
Aug 19, 2010, 11:58:24 PM8/19/10
to ColdFusion on Wheels
I see now that maybe I am having those problems cause I am not using
the 1.0 version of Wheels! I just noticed that! Didn't see this until
now. Do you think this may be the cause of my problems?

On Aug 20, 5:52 am, ComboFusion <areb...@gmail.com> wrote:
> Thank you Chris for your fast response. Sorry for the "instructor"
> thing. :) I have been working all night and I am very tired. :) My
> comments are between the paragraphs you wrote...
>
> > When you change something in config, you need to issue a reload of the app settings by clicking the reload link in the footer or by putting ?reload=true at the end of the URL. Did you try that?
>
> As you can see in this screen cast I just made (http://screenr.com/
> zq0), you can see that I don't have the same layout as you do in the
> video. There is no refresh button. What the heck am I missing here?
> Sorry for no sound in the screencast... my microphone is broken! :/
>
> > I know you mention "refreshing the website," but I don't want to make assumptions on what you meant.
>
> I refreshed by literally clearing the cache in the URL. Like this:http://localhost:8500/cfprojects/wheels/index.cfm?reload=true. BTW,
> here I wonder, why I cannot simply write like this:http://localhost:8500/cfprojects/wheels/?reload=true? It simply does

Chris Peters

unread,
Aug 20, 2010, 5:48:12 AM8/20/10
to cfwh...@googlegroups.com
Definitely try downloading version 1.0.5 at cfwheels.org. I think we changed the name of the labelPlacement argument after 0.9.3, which is what you're running.

Might I ask where you downloaded that version? We released 1.0 in November 2009 and have come out with several maintenance releases since then.

I was kidding about the instructor thing. I thought it was kind of funny. :D

Chris Peters

unread,
Aug 20, 2010, 5:58:29 AM8/20/10
to ColdFusion on Wheels
I forgot to answer your question about URLs.

This depends on a couple different things:
- You can only get pretty URLs if Wheels is installed in your site's
root folder or one subfolder deep. Right now, you have it two
subfolders deep (/cfprojects/cfwheels)
- This also depends on the capabilities of your web server. I
recommend using Apache or IIS as those are the most supported by our
community.

You can read more about URL rewriting here:
http://cfwheels.org/docs/chapter/url-rewriting

On Aug 19, 11:52 pm, ComboFusion <areb...@gmail.com> wrote:
> Thank you Chris for your fast response. Sorry for the "instructor"
> thing. :) I have been working all night and I am very tired. :) My
> comments are between the paragraphs you wrote...
>
> > When you change something in config, you need to issue a reload of the app settings by clicking the reload link in the footer or by putting ?reload=true at the end of the URL. Did you try that?
>
> As you can see in this screen cast I just made (http://screenr.com/
> zq0), you can see that I don't have the same layout as you do in the
> video. There is no refresh button. What the heck am I missing here?
> Sorry for no sound in the screencast... my microphone is broken! :/
>
> > I know you mention "refreshing the website," but I don't want to make assumptions on what you meant.
>
> I refreshed by literally clearing the cache in the URL. Like this:http://localhost:8500/cfprojects/wheels/index.cfm?reload=true. BTW,
> here I wonder, why I cannot simply write like this:http://localhost:8500/cfprojects/wheels/?reload=true? It simply does

ComboFusion

unread,
Aug 20, 2010, 6:40:30 AM8/20/10
to ColdFusion on Wheels
Thank you very much for your helpful answer. Next time, if I'll have a
question about Wheels I'll post it here. However as much as I like
Google groups, I am not happy with the lack of [code][/code] wrapping
or any code editing or whatsoever. It makes posting questions
regarding different bits of code very frustrating. That is why I
forwarded my question to the DreaminCode forum. I hope that the people
at Google do something about this in the near future. Wouldn't that be
great? Now you don't have any chance of editing the text in this post
or whatsoever and that sucks! :/ Even the ColdFusion community doesn't
have this option.

> Definitely try downloading version 1.0.5 at cfwheels.org. I think we changed
> the name of the labelPlacement argument after 0.9.3, which is what you're
> running.

I already did and what I also did was just overwriting the files. I
guess I should have made a totally new folder and start all over again
with the fresh version 1.0.5...

> Might I ask where you downloaded that version? We released 1.0 in November
> 2009 and have come out with several maintenance releases since then.

Well, I downloaded Wheels on September 10, 2009 on the official
website. So that was just before you uploaded the 1.0 version. :)


> I was kidding about the instructor thing. I thought it was kind of funny. :D

I know. :) My English gets worst and worst when I am more and more
tired! :)

ComboFusion

unread,
Aug 20, 2010, 6:45:30 AM8/20/10
to ColdFusion on Wheels

> I forgot to answer your question about URLs.
> This depends on a couple different things:
>  - You can only get pretty URLs if Wheels is installed in your site's
> root folder or one subfolder deep. Right now, you have it two
> subfolders deep (/cfprojects/cfwheels)

Ah, thank you! Useful info!

>  - This also depends on the capabilities of your web server. I
> recommend using Apache or IIS as those are the most supported by our
> community.

Right now I am using the CF Server, developer's edition. I chose the
built-in server. I am confused... does apache support CFML?? Never
heard of anything like it. :) Maybe I mixed up something.

> You can read more about URL rewriting here:http://cfwheels.org/docs/chapter/url-rewriting

Thank you very much.

Chris Peters

unread,
Aug 20, 2010, 6:57:19 AM8/20/10
to cfwh...@googlegroups.com
The best practice for production apps is to hook Apache or IIS into CF, and many developers do this in their local environments too. A fast way to get up and running is to install something like WAMP on Windows or MAMP on Mac and Google for instructions about hooking it up to CF.

There are a couple SDKs out there too. One is Fusegrid SDK, which bundles Railo, Wheels, MySQL, and other goodness together into a single download:
http://www.fusegrid.com/sdk/

I think URL rewriting works for that out of the box, right?

raulriera

unread,
Aug 20, 2010, 8:46:38 AM8/20/10
to ColdFusion on Wheels
Yes, FuseGrid SDK will come with full URL rewriting out of the box,
it's a great download... it even includes a SQLite database for you to
play with.

(I am not getting paid for this haha, I just loved the idea)
> > cfwheels+u...@googlegroups.com<cfwheels%2Bunsubscribe@googlegroups.c om>
> > .

ComboFusion

unread,
Aug 20, 2010, 11:12:50 AM8/20/10
to ColdFusion on Wheels
> I forgot to answer your question about URLs.
> This depends on a couple different things:
>  - You can only get pretty URLs if Wheels is installed in your site's
> root folder or one subfolder deep. Right now, you have it two
> subfolders deep (/cfprojects/cfwheels)

OK, fixed that and even uploaded the last version of Wheels, but the
URL still includes index.cfm...
(http://localhost:8500/WheelsCasts/index.cfm/User/register)

>  - This also depends on the capabilities of your web server. I
> recommend using Apache or IIS as those are the most supported by our
> community.

So I guess the problem may be with the type of server. I will try to
fix the URL problem right after I finish with the screencasts you
posted. I look forward for some new ones, cause they are a great help!

Thank you!

ComboFusion

unread,
Aug 20, 2010, 11:15:04 AM8/20/10
to ColdFusion on Wheels
Oh, BTW, now form formatting works just fine with Wheels 1.0.5!!! :) I
will need to learn to make my own helpers ASAP! :)

It is funny, how helpers in Wheels remind me so much of Smarty tags in
PHP! :)

raulriera

unread,
Aug 20, 2010, 3:38:01 PM8/20/10
to ColdFusion on Wheels
From your URL it seems that you are using ColdFusion + JRun, that
won't give you full url rewriting...
Reply all
Reply to author
Forward
0 new messages