FAQ
Ok, this should be simple but I am drawing a blank.

How do I create a text field (or a password field),
in YML, and have the label start on a new line (not the same line
as the text field.

Normally (in a form) I just do:

Userid:<br /> <input type="text" size="30" /><br />

And it works.

Thank you in advance.

-George

Search Discussions

  • Kamen Naydenov at Jun 2, 2011 at 9:15 am

    On Thu, Jun 2, 2011 at 11:27, George Hrysanthopoulos wrote:
    Ok, this should be simple but I am drawing a blank.

    How do I create a text field (or a password field),
    in YML, and have the label start on a new line (not the same line
    as the text field.

    Normally (in a form) I just do:

    Userid:<br /> <input type="text" size="30" /><br />

    And it works.

    Thank you in advance.

    -George
    Visual appearing of form elements is controlled via CSS styles (avoid
    using <br />)
    Here is example of YML for login form:
    <yml>
    ---
    auto_id: '%n'
    auto_constraint_class: '%t'
    # indicator is the field that is used to test for form submission
    indicator: submit
    auto_fieldset:
    legend: Login form
    # Start listing the form elements
    elements:
    - type: Text
    name: username
    label: Userid
    - type: Password
    name: password
    label: Pass
    - type: Submit
    name: submit
    </yml>

    Than you need something like following CSS snippet:
    <css>
    label { display: block; }
    </css>

    And this will put labels on new line.

    best regards
    Kamen
  • George Hrysanthopoulos at Jun 2, 2011 at 8:42 pm
    Kamen,

    You are the man!

    Thank you!

    -George
    On 6/2/11 5:15 AM, Kamen Naydenov wrote:
    On Thu, Jun 2, 2011 at 11:27, George Hrysanthopouloswrote:
    Ok, this should be simple but I am drawing a blank.

    How do I create a text field (or a password field),
    in YML, and have the label start on a new line (not the same line
    as the text field.

    Normally (in a form) I just do:

    Userid:<br /> <input type="text" size="30" /><br />

    And it works.

    Thank you in advance.

    -George
    Visual appearing of form elements is controlled via CSS styles (avoid
    using<br />)
    Here is example of YML for login form:
    <yml>
    ---
    auto_id: '%n'
    auto_constraint_class: '%t'
    # indicator is the field that is used to test for form submission
    indicator: submit
    auto_fieldset:
    legend: Login form
    # Start listing the form elements
    elements:
    - type: Text
    name: username
    label: Userid
    - type: Password
    name: password
    label: Pass
    - type: Submit
    name: submit
    </yml>

    Than you need something like following CSS snippet:
    <css>
    label { display: block; }
    </css>

    And this will put labels on new line.

    best regards
    Kamen

    _______________________________________________
    HTML-FormFu mailing list
    HTML-FormFu@lists.scsys.co.uk
    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
  • Adam Prime at Jun 2, 2011 at 9:19 pm
    Often CSS isn't enough for complicated layouts. For example take a look
    at this $work form:

    https://fxtrade.oanda.ca/your_account/fxtrade/register/individual/beforeyoubegin

    That's a FormFu form, but with pretty extensive use of the 'filename'
    parameter to handle all the complicated layout (and it gets more
    complicated on the pages after the first one)

    Are other people leveraging this stuff?

    Adam

    On 11-06-02 04:42 PM, George Hrysanthopoulos wrote:
    Kamen,

    You are the man!

    Thank you!

    -George
    On 6/2/11 5:15 AM, Kamen Naydenov wrote:
    On Thu, Jun 2, 2011 at 11:27, George
    Hrysanthopouloswrote:
    Ok, this should be simple but I am drawing a blank.

    How do I create a text field (or a password field),
    in YML, and have the label start on a new line (not the same line
    as the text field.

    Normally (in a form) I just do:

    Userid:<br /> <input type="text" size="30" /><br />

    And it works.

    Thank you in advance.

    -George
    Visual appearing of form elements is controlled via CSS styles (avoid
    using<br />)
    Here is example of YML for login form:
    <yml>
    ---
    auto_id: '%n'
    auto_constraint_class: '%t'
    # indicator is the field that is used to test for form submission
    indicator: submit
    auto_fieldset:
    legend: Login form
    # Start listing the form elements
    elements:
    - type: Text
    name: username
    label: Userid
    - type: Password
    name: password
    label: Pass
    - type: Submit
    name: submit
    </yml>

    Than you need something like following CSS snippet:
    <css>
    label { display: block; }
    </css>

    And this will put labels on new line.

    best regards
    Kamen

    _______________________________________________
    HTML-FormFu mailing list
    HTML-FormFu@lists.scsys.co.uk
    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

    _______________________________________________
    HTML-FormFu mailing list
    HTML-FormFu@lists.scsys.co.uk
    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
  • George Hrysanthopoulos at Jun 3, 2011 at 1:38 am
    Adam,

    That's quite a form!

    It might take a while for me to understand
    what's going on in there.

    However, it is a nice thing to aim for.

    Question: Why don't you put the output through
    "HTML::Tidy" ?

    -George
    On 6/2/11 5:19 PM, Adam Prime wrote:
    Often CSS isn't enough for complicated layouts. For example take a look at this $work form:

    https://fxtrade.oanda.ca/your_account/fxtrade/register/individual/beforeyoubegin

    That's a FormFu form, but with pretty extensive use of the 'filename' parameter to handle all the complicated layout (and it gets more complicated on the pages after the first one)

    Are other people leveraging this stuff?

    Adam

    On 11-06-02 04:42 PM, George Hrysanthopoulos wrote:
    Kamen,

    You are the man!

    Thank you!

    -George
    On 6/2/11 5:15 AM, Kamen Naydenov wrote:
    On Thu, Jun 2, 2011 at 11:27, George Hrysanthopouloswrote:
    Ok, this should be simple but I am drawing a blank.

    How do I create a text field (or a password field),
    in YML, and have the label start on a new line (not the same line
    as the text field.

    Normally (in a form) I just do:

    Userid:<br /> <input type="text" size="30" /><br />

    And it works.

    Thank you in advance.

    -George
    Visual appearing of form elements is controlled via CSS styles (avoid
    using<br />)
    Here is example of YML for login form:
    <yml>
    ---
    auto_id: '%n'
    auto_constraint_class: '%t'
    # indicator is the field that is used to test for form submission
    indicator: submit
    auto_fieldset:
    legend: Login form
    # Start listing the form elements
    elements:
    - type: Text
    name: username
    label: Userid
    - type: Password
    name: password
    label: Pass
    - type: Submit
    name: submit
    </yml>

    Than you need something like following CSS snippet:
    <css>
    label { display: block; }
    </css>

    And this will put labels on new line.

    best regards
    Kamen

    _______________________________________________
    HTML-FormFu mailing list
    HTML-FormFu@lists.scsys.co.uk
    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

    _______________________________________________
    HTML-FormFu mailing list
    HTML-FormFu@lists.scsys.co.uk
    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

    _______________________________________________
    HTML-FormFu mailing list
    HTML-FormFu@lists.scsys.co.uk
    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
  • Adam Prime at Jun 3, 2011 at 2:26 am
    You mean you don't like all the extra white space, bizarre wrapping and so on? Me either. I don't really have a good answer as to why we don't put it through HTML::Tidy, but my first guess would be performance, and the fact that messy html does affect rendering, it just looks ugly to people that actually know how to view source ;)

    Maybe i'll try to put together a bit of a tutorial about how to make significant layout changes.

    Adam

    ----- Original Message -----
    From: "George Hrysanthopoulos" <xaos@darksmile.net>
    To: "HTML Form Creation, Rendering and Validation Framework" <html-formfu@lists.scsys.co.uk>
    Sent: Thursday, June 2, 2011 9:38:12 PM
    Subject: Re: [html-formfu] Issue with a text label

    Adam,

    That's quite a form!

    It might take a while for me to understand
    what's going on in there.

    However, it is a nice thing to aim for.

    Question: Why don't you put the output through
    "HTML::Tidy" ?

    -George
    On 6/2/11 5:19 PM, Adam Prime wrote:
    Often CSS isn't enough for complicated layouts. For example take a look at this $work form:

    https://fxtrade.oanda.ca/your_account/fxtrade/register/individual/beforeyoubegin

    That's a FormFu form, but with pretty extensive use of the 'filename' parameter to handle all the complicated layout (and it gets more complicated on the pages after the first one)

    Are other people leveraging this stuff?

    Adam

    On 11-06-02 04:42 PM, George Hrysanthopoulos wrote:
    Kamen,

    You are the man!

    Thank you!

    -George
    On 6/2/11 5:15 AM, Kamen Naydenov wrote:
    On Thu, Jun 2, 2011 at 11:27, George Hrysanthopouloswrote:
    Ok, this should be simple but I am drawing a blank.

    How do I create a text field (or a password field),
    in YML, and have the label start on a new line (not the same line
    as the text field.

    Normally (in a form) I just do:

    Userid:<br /> <input type="text" size="30" /><br />

    And it works.

    Thank you in advance.

    -George
    Visual appearing of form elements is controlled via CSS styles (avoid
    using<br />)
    Here is example of YML for login form:
    <yml>
    ---
    auto_id: '%n'
    auto_constraint_class: '%t'
    # indicator is the field that is used to test for form submission
    indicator: submit
    auto_fieldset:
    legend: Login form
    # Start listing the form elements
    elements:
    - type: Text
    name: username
    label: Userid
    - type: Password
    name: password
    label: Pass
    - type: Submit
    name: submit
    </yml>

    Than you need something like following CSS snippet:
    <css>
    label { display: block; }
    </css>

    And this will put labels on new line.

    best regards
    Kamen

    _______________________________________________
    HTML-FormFu mailing list
    HTML-FormFu@lists.scsys.co.uk
    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

    _______________________________________________
    HTML-FormFu mailing list
    HTML-FormFu@lists.scsys.co.uk
    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

    _______________________________________________
    HTML-FormFu mailing list
    HTML-FormFu@lists.scsys.co.uk
    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

    _______________________________________________
    HTML-FormFu mailing list
    HTML-FormFu@lists.scsys.co.uk
    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
  • George Hrysanthopoulos at Jun 3, 2011 at 3:38 am
    Adam,

    If you do decide to filter through tidy,

    I would suggest this code snippet:

    my $tidy = HTML::Tidy->new( {
    "tidy_mark" => 0,
    "indent" => "auto",
    "indent-spaces" => 4,
    "preserve-entities" => "yes",
    } );

    Otherwise your IE users will not like you very much :)

    Why does MS have to make our life so much more difficult?

    -George

    On 6/2/11 10:26 PM, Adam Prime wrote:
    You mean you don't like all the extra white space, bizarre wrapping and so on? Me either. I don't really have a good answer as to why we don't put it through HTML::Tidy, but my first guess would be performance, and the fact that messy html does affect rendering, it just looks ugly to people that actually know how to view source ;)

    Maybe i'll try to put together a bit of a tutorial about how to make significant layout changes.

    Adam

    ----- Original Message -----
    From: "George Hrysanthopoulos"<xaos@darksmile.net>
    To: "HTML Form Creation, Rendering and Validation Framework"<html-formfu@lists.scsys.co.uk>
    Sent: Thursday, June 2, 2011 9:38:12 PM
    Subject: Re: [html-formfu] Issue with a text label

    Adam,

    That's quite a form!

    It might take a while for me to understand
    what's going on in there.

    However, it is a nice thing to aim for.

    Question: Why don't you put the output through
    "HTML::Tidy" ?

    -George
    On 6/2/11 5:19 PM, Adam Prime wrote:
    Often CSS isn't enough for complicated layouts. For example take a look at this $work form:

    https://fxtrade.oanda.ca/your_account/fxtrade/register/individual/beforeyoubegin

    That's a FormFu form, but with pretty extensive use of the 'filename' parameter to handle all the complicated layout (and it gets more complicated on the pages after the first one)

    Are other people leveraging this stuff?

    Adam

    On 11-06-02 04:42 PM, George Hrysanthopoulos wrote:
    Kamen,

    You are the man!

    Thank you!

    -George
    On 6/2/11 5:15 AM, Kamen Naydenov wrote:
    On Thu, Jun 2, 2011 at 11:27, George Hrysanthopouloswrote:
    Ok, this should be simple but I am drawing a blank.

    How do I create a text field (or a password field),
    in YML, and have the label start on a new line (not the same line
    as the text field.

    Normally (in a form) I just do:

    Userid:<br /> <input type="text" size="30" /><br />

    And it works.

    Thank you in advance.

    -George
    Visual appearing of form elements is controlled via CSS styles (avoid
    using<br />)
    Here is example of YML for login form:
    <yml>
    ---
    auto_id: '%n'
    auto_constraint_class: '%t'
    # indicator is the field that is used to test for form submission
    indicator: submit
    auto_fieldset:
    legend: Login form
    # Start listing the form elements
    elements:
    - type: Text
    name: username
    label: Userid
    - type: Password
    name: password
    label: Pass
    - type: Submit
    name: submit
    </yml>

    Than you need something like following CSS snippet:
    <css>
    label { display: block; }
    </css>

    And this will put labels on new line.

    best regards
    Kamen

    _______________________________________________
    HTML-FormFu mailing list
    HTML-FormFu@lists.scsys.co.uk
    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
    _______________________________________________
    HTML-FormFu mailing list
    HTML-FormFu@lists.scsys.co.uk
    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
    _______________________________________________
    HTML-FormFu mailing list
    HTML-FormFu@lists.scsys.co.uk
    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
    _______________________________________________
    HTML-FormFu mailing list
    HTML-FormFu@lists.scsys.co.uk
    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

    _______________________________________________
    HTML-FormFu mailing list
    HTML-FormFu@lists.scsys.co.uk
    http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
  • Octavian Rasnita at Jun 3, 2011 at 5:12 am
    From: "Adam Prime" <aprime@oanda.com>
    You mean you don't like all the extra white space, bizarre wrapping and so
    on? Me either. I don't really have a good answer as to why we don't put
    it through HTML::Tidy, but my first guess would be performance, and the
    fact that messy html does affect rendering, it just looks ugly to people
    that actually know how to view source ;)

    Maybe i'll try to put together a bit of a tutorial about how to make
    significant layout changes.

    Adam

    It would be helpful to show the FF configuration used for creating this
    form, the CSS and the relevant Perl code.


    Octavian
  • Adam Prime at Jun 3, 2011 at 2:01 pm

    On 11-06-03 01:12 AM, Octavian Rasnita wrote:
    From: "Adam Prime" <aprime@oanda.com>
    You mean you don't like all the extra white space, bizarre wrapping
    and so on? Me either. I don't really have a good answer as to why
    we don't put it through HTML::Tidy, but my first guess would be
    performance, and the fact that messy html does affect rendering, it
    just looks ugly to people that actually know how to view source ;)

    Maybe i'll try to put together a bit of a tutorial about how to make
    significant layout changes.

    Adam

    It would be helpful to show the FF configuration used for creating
    this form, the CSS and the relevant Perl code.
    The application that that form comes from is really complicated. I'm
    going to try to come up with a bit of a story for a simple application
    that echoes a work experience, and highlight how we leveraged Catalyst
    and FormFu to make it all work. It's going to take a little while though...

    Adam
  • Adam Prime at Jun 7, 2011 at 4:45 am
    I've created it a repo on github that has a really basic catalyst login for example in the master branch. There's another branch called 'advanced', which has a really stripped down example of some of the funky stuff we're doing in the form I linked to last week. The repo is here:

    https://github.com/jsut/FormFuExamples

    Feedback appreciated.

    Adam

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouphtml-formfu @
categoriesperl, catalyst
postedJun 2, '11 at 8:27a
activeJun 7, '11 at 4:45a
posts10
users4
websitemetacpan.org...

People

Translate

site design / logo © 2022 Grokbase