Reputation: 1893
I want to create simple HTML button which links to other page when user clicks on it. I am new to Drupal, I've seen that we can create fields from "Structure>Content Types>Article>Manage Fields>Add new field - Field types.."
Can we create button from this way or we have to write code to create it?
Thanks
Upvotes: 1
Views: 11471
Reputation: 557
There is a beta module called Button Field that works with the Rules module. I believe will do what you're looking for. You can add a button to any fieldable entity and define a rule for it when it's pressed.
See https://drupal.org/project/button_field and https://drupal.org/project/rules
Upvotes: 2
Reputation: 748
Or just use the Field Button module: https://drupal.org/project/button_field
and create the buttons as you create fields...
Upvotes: 1
Reputation: 326
Buttons typically have to be coded. The way you're talking about above is the process for creating form elements for creating new pieces of content. If you want a simple button on a page to link to another page, you can just code it as follows:
<input type="button" value="Visit Another Page" onclick="location.href='your/other/web/page'" />
You may need to install a WYSIWYG text editor to add HTML to a page, if you don't already have one.
Upvotes: 1
Reputation: 1
With the help of views or webform, block module can create a button with out writing code.
Upvotes: 0