3 Replies - 697 Views - Last Post: 20 August 2010 - 07:53 PM Rate Topic: -----

#1 ComboAlex  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 31-July 09

Wheels, problem with formatting forms

Posted 19 August 2010 - 07:45 PM

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.

I am trying to format some text fields in a form, as explained in this screencast: the screencast

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 (obviously not correct):

<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.

Is This A Good Question/Topic? 0
  • +

Replies To: Wheels, problem with formatting forms

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6036
  • View blog
  • Posts: 23,418
  • Joined: 23-August 08

Re: Wheels, problem with formatting forms

Posted 19 August 2010 - 08:19 PM

Moved to ColdFusion
Was This Post Helpful? 0
  • +
  • -

#3 ComboAlex  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 31-July 09

Re: Wheels, problem with formatting forms

Posted 19 August 2010 - 08:21 PM

View PostJackOfAllTrades, on 19 August 2010 - 07:19 PM, said:

Moved to ColdFusion


Oh, sorry. I guess I am so tired that I missed the correct category. :) I hope now is fine.
Was This Post Helpful? 0
  • +
  • -

#4 xheartonfire43x  Icon User is offline

  • D.I.C Regular

Reputation: 46
  • View blog
  • Posts: 454
  • Joined: 22-December 08

Re: Wheels, problem with formatting forms

Posted 20 August 2010 - 07:53 PM

I have not worked with the CF on Wheels framework before, but I can tell you for certain that the problem is that labelPlacement argument. Looking at the docs on textField I see that the default value of labelPlacement is around which I am sure you will agree with me is what is happening to your text field.

Is the textField() function used in a view somewhere? Could you post that snippet as well if so?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1