Submit a form using anchors?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I think I probably know that answer, but I will ask anyway.
Is it possible to submit a form using a standard anchor link, rather
than a submit button?

The reason I ask is that I have a standard form, but I want links to
enable to user to add additional data for each section if they desire.
In order for what they have already typed in to be preserved, I need to
submit the form data when one of these links is clicked. This is fairly
straightforward in Javascript, but I want to add non JS support too.

I suspect this is not possible, so I will have to think of another
design in this case, but thought I would check. And before you ask, no
it is not possible to put all the information on the one form, and it
would be highly redundant in most cases to present it as a straight
series of forms :-(


Re: Submit a form using anchors? wrote:
Quoted text here. Click to load it

Using Javascript.

Try reorganizing your form. Each section is a separate page. If a
section might be inapplicable, you can have two buttons: Submit and Skip
This Section.

Re: Submit a form using anchors?

Another option is to load all form on one page, but hide some of it's
part that are redundant to most users. Having links like "customize
section ``C''" just showing hidden portions of the form. Such solution
is faster for a user, but if you want you site to work without
javascript to than it's not an option.

Maybe you can have buttons to look like links and do the work you want.

Re: Submit a form using anchors? wrote:

Quoted text here. Click to load it

No - unless you use scripting.

Easiest fix is to keep the standard form submission, but use CSS to
style the submit to look however you want - such as like a simple link.

Re: Submit a form using anchors? wrote:
Quoted text here. Click to load it

Dear sir,
You can either end up using scripting such as JavaScript to
automatically make the extra sections appear by clicking the link, and
changing the link to make it submit, or you can make yourself
completely rewrite the page dynamically with a server-side language.
The first method is the easiest, although it might not work with
everyone's browser.

I have the honor to remain your most humble and Ob't Sv't in our war
against the King.

Patrick Reilly
1st Coy.
Colonel Seth Warner's Regiment

Site Timeline