开发者

Input buttons as links?

开发者 https://www.devze.com 2023-03-20 11:43 出处:网络
Is their a case for using input buttons as page links, when your linking to the next of a series of pages of a form where your开发者_运维问答 filling out information?

Is their a case for using input buttons as page links, when your linking to the next of a series of pages of a form where your开发者_运维问答 filling out information?

UPDATE - Ive inherited a site. One section is a series of pages of forms that users fill in. The 'next' link to the next page is currently an input button, not a normal link.

Is this bad from a standards / semantics point of view?


I am not sure what you exactly want. But what about, you can use the button to navigate through the pages. Just put the url address of the next page.

<form action="page_number_2.htm">

But you will need to store formulat data from every page. I mean, if the user fill the formular on one page and go to the next formular, you don't want to lose the data from the filled formular. You can stored them with php until the user will reach the final formular step, where he will klick submit-button.

Actually the link is used for navigation through the pages. But in this case, if I understand right, you need to send data from formular, if the user go to the next formular. So in this case, better to use button. Still you can make this button look like link.


It is possible to make links appear as buttons. However, in the situation you describe, it would be a bad idea. The form data will only be submitted to your server if you use a form. Allowing the user to click a link to go to the next page will cause you to lose all of the data they entered (Unless you are collecting that data via AJAX).

It is usually best to allow page element to perform the functions they were designed for to avoid confusing your users. Users expects links to work like links, and buttons to work like buttons.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号