[Pro] Two Forms on one page

I haven’t tried it yet. I know how to get one form on a page, but I need to have two forms on a single page. I’ve been using a second form as a markup item, but I’d like to have two forms by letting Freeway add them, as I’m getting a validation error @ WCW validation. The page displays properly, but I’d like to get verified.

Any help will be appreciated.

Bryan


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

There is a set of Actions called Multiple Forms, and it allows you to do this. The issue is that if you have any sort of a regular Freeway form object on the page, Freeway will put a FORM tag just inside the BODY, and any other form you add will be nested inside that. Technically speaking, it won’t work, although some browsers don’t mind.

The Multiple Forms Action has one component that removes this outer form, and then you draw a Multiple Form on the page wherever you need a form. That makes the form tags separate from one another, as peers. The page will be valid, and will actually work predictably in any browser.

http://actionsforge.com/projects/view/24-multiple-form-suite

Walter


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

Hi Walt- I installed the action, and it works… however one thing. On the submit button for my form, I need to add a javascript “onclick” action and I don’t see anywhere I can add an “extended” option to the button, so I can add this.

Is there anyway to add code to the submit button? I checked the action pallet and the inspector but didn’t see that option.

Bryan


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

If you make your submit button in Freeway, then you can add this using the Item / Extended dialog in Freeway. Add a new options in that dialog, and in the Name field enter onclick and in the Value field, enter whatever you need for that.

Walter


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

Thanks Walter- Your a life/time saver. Every time I learn something new in Freeway I’m so impressed at how powerful this application actually is. And when I think I’m using some of the advanced features, I find that there are other things that I can do to make my life much easier.

Bryan


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

Ok… I’m soooo almost there. The form is setup using the Multiple Forms action, I have the onclick within the button. The only thing now I’m trying to figure out is how to get target=“_self” within the tag. Within the action panel, there is no option to extend the tag there, and you can’t use the standard Form Setup…

If I can’t get this last thing, it’s not much of a biggie, but I’d like to have the target parameter in there as well.

Bryan


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

_self is the default target. The only reason you would ever have to set it on the form is if you set a different target on the page itself, but wanted to make sure the form posted to itself. Do you find that you need this setting? If you set the Action of the form to the page filename, that should work.

Walter


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

Yeah, the window opens without the target=“_self” within the tag. So that’s not a problem. A problem would arise if I wanted to add some javascript command within the form tag. Unlike the Forms Setup, you can’t add the extended options to the tag from the Multiple Forms action.

Bryan


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

Try opening that Action with a text editor, like BBEdit or TextMate. If it doesn’t look like a bunch of hash (encoded for Express) then you can add a field to it pretty easily. Look at how the Name field is added:

Then further down in the Action, that value gets added to the form like this:

form.name = '"'+fwParameters.Name+'"';

So you would add a text field called Target in the next line after the Name:

and then right after the form.name = line, you would add this:

if(fwParameters.Target.length > 0) 
    form.target = '"'+fwParameters.Target+'"';

And that should get you there.

Walter


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