[Pro]

This will place the padding on the error span as intended.

Tim,

Thanks Tim, I appreciate the detailed instructions you provided. I’ve done exactly what you said and updated the link

(Live Lights | 30 Years of Creativity)

For some reason only the left & right margins are taking effect on the text. The style is being assigned correctly with the appropriate margin properties in the code. Though visually, it seems to ignore the top & bottom margins.

Is there something I’m missing? Would it be helpful to send my freeway document?

Thanks,
Bernard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Bernard,
Try this;

  1. Edit the style we added last time (div#error span) and rename it #error p
  2. Make sure that the style set in the Extended section is;
    name: padding
    value: 15px 15px 15px 30px
    (or whatever values suit)

I noticed that you had a margin set on the span rather than padding.

This will apply the padding to the paragraph rather than the span but should have the same intended effect.
Regards,
Tim.

FreewayActions.com - Freeware and commercial Actions for Freeway Express & Pro - http://www.freewayactions.com
FreewayStyle.com - Free Freeway templates and parts to download, use and explore - http://www.freewaystyle.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

This will apply the padding to the paragraph rather than the span but should have the same intended effect.

Hey Tim,

I’ve updated the link with the padding change

(Live Lights | 30 Years of Creativity)

The style now adds padding to the span but it’s behaving the same way as the margins. Left & right works but top & bottom are ignored.

This would make logical sense to work but it doesn’t seem to be playing nicely. Could I send you my test file? It seems to be some anomaly or some default styling by freeway.

Again thank you for your help,
Bernard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You’re seeing something that’s specific to padding and margin. It’s the notion of collapse, when a margin meets another margin or a padding meets another padding in the absence of a margin.

Take a look at this page, and play with the settings.

http://scripty.walterdavisstudio.com/margins.html

There are three spans inline within the outer div. The spans have purple borders, and the divs have gray. Note that when you add padding or margin to the spans, the dimensions are calculated from the content of the span, not the outer borders. When you make the spans display:block, then they push each other around as you would expect. But look again as you add padding and margin to the now block-level spans without adding any padding or margin to the outer div: they don’t repel one another the way you would imagine they should. Note what happens when you set any value at all – even 0 – for the margin and padding, so everything has a value. All of a sudden you see the elements pushing each other away from one another correctly.

I couldn’t figure out how to clear a padding or margin set with Prototype’s setStyle method, so if you want to zero everything out, you’ll need to reload the page.

Walter

On Jun 15, 2012, at 3:18 PM, TeamSDA wrote:

This will apply the padding to the paragraph rather than the span but should have the same intended effect.

Hey Tim,

I’ve updated the link with the padding change

(Live Lights | 30 Years of Creativity)

The style now adds padding to the span but it’s behaving the same way as the margins. Left & right works but top & bottom are ignored.

This would make logical sense to work but it doesn’t seem to be playing nicely. Could I send you my test file? It seems to be some anomaly or some default styling by freeway.

Again thank you for your help,
Bernard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Nice little teaching tool Walt.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Reload, I just rearranged it a little to make it easier to use.

Walter

On Jun 15, 2012, at 6:54 PM, chuckamuck wrote:

Nice little teaching tool Walt.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 15 Jun 2012, 9:06 pm, waltd wrote:

You’re seeing something that’s specific to padding and margin. It’s the notion of collapse, when a margin meets another margin or a padding meets another padding in the absence of a margin.

Take a look at this page, and play with the settings.

Margin and Padding Fun

Walter,

Awesome! That absolutely worked! The example really helped me understand exactly whats happening with my margins/padding. I appreciate the time you took to put that together.

Right now I am using the html markup item to insert the display:block style to the span tag. This is what lives in the markup item.

<input type="hidden" name="global_msg" value="&lt;span style=display:block&gt;Field(s) require your attention&lt;/span&gt;" />

One thing that is not showing up in my code area is the character entities I have to use to generate the < and >. Trying to avoid as much of this hand coding as possible.

Is there an easier way to do it inside of freeway or am I limited to this option?

Thanks,
Bernard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’m not sure why you are doing this in a hidden field. Is this how FTG prefers to work?

If I were validating the form, I would either dynamically add the error message in PHP on the server before re-displaying the form, or I would use JavaScript to show or hide it on the browser. I haven’t used FTG at all, tried it out once and didn’t like it, so I really don’t know what I’m talking about here.

When I use PHP to process a form, I usually follow this pattern. Here’s a basic form validation loop that runs on the server. This assumes that any field that begins with an underscore should be ignored, and any field that does not begin with an underscore should be filled in:

With that, you then can simply use PHP to decide if the error should appear:

<?php if(isset($error_message)) print $error_message; ?>

Put that snippet in your form page where you want the error message to appear, include the other script in the Before HTML section of the form page, and then post the form to itself. Also apply the PHP Form Action to the page, as this gets you the automatic field value behavior.

Walter

On Jun 15, 2012, at 8:10 PM, TeamSDA wrote:

Right now I am using the html markup item to insert the display:block style to the span tag. This is what lives in the markup item.

<input type="hidden" name="global_msg" value="&lt;span style=display:block&gt;Field(s) require your attention&lt;/span&gt;" />

One thing that is not showing up in my code area is the character entities I have to use to generate the < and >. Trying to avoid as much of this hand coding as possible.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter,

Thank you for the response. We do appreciate the help and detail you provide in your posts. I read through your post trying to understand it, but it went a little over my head.

To answer your first question; Yes, FTG recommended this method be used. My thinking is so we don’t have to go in the PHP script generated from the application and manually put code in. We are stay out of the code as much as possible.

Is there anything in this method that would cause a break?

Thanks,
Bernard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

No, but without knowing how the FTG script is written, I don’t honestly understand how it works, either. You’re putting HTML in the value of a hidden field, and that’s just not something I’ve done before for any reason. If they have a documented way to work with this, then sure, go ahead and do it that way.

Walter

On Jun 18, 2012, at 1:53 PM, TeamSDA wrote:

Walter,

Thank you for the response. We do appreciate the help and detail you provide in your posts. I read through your post trying to understand it, but it went a little over my head.

To answer your first question; Yes, FTG recommended this method be used. My thinking is so we don’t have to go in the PHP script generated from the application and manually put code in. We are stay out of the code as much as possible.

Is there anything in this method that would cause a break?

Thanks,
Bernard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter,

We are going to go with this method and see how it works out. Thank you Walter for your input and guidance on this issue.

I appreciate the time everyone put into helping us regarding this issue. I value the Freeway Community.

Thanks, Bernard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options