Hello everyone,
I have been doing some research into changing the save button on my drupal forums to display post instead. I have gotten a lot of feedback from my website requesting this. The best fix I have currently found is to create a new module that does this. I grabbed someones code from a suggestion a few years ago that seems to work for most but not me. I am not sure if the code or the way I created the .info and .module is incorrect. Any suggestions are welcome!
change_forum_values.info
name = Change Forum Value
description = Changes the save button to post button.
core = 7.x
change_forum_values.module
<?php
function change_form_values_form_alter(&$form, &$form_state, $form_id) {
//dsm($form_id); // to see form ID
if ($form_id == "content_type_test_node_form") {
$form['actions']['submit']['#value'] = 'Post';
}
}
I have the module enabled but it is still showing save for my forums.
Comments
=-=
psssst. There's already a module for that @ https://www.drupal.org/project/node_buttons_edit
Half way there.
This worked for the initial post but when replying to someones topic it still says "save".
http://retrogamer.us/node/210 to see my issue.
You have to include comment
You have to include comment form id also.. So that it will change the label in comment form also.
Here is the example
I went with the module
I went with the module already created as mine would not work. I am looking for a similar section for your modification but don't see one. Any suggestions on where I can add your fix?
=-=
The link doesn't aid as I don't have a user on your site so I don't see the button you are referring to. first thing I'd do is check the issue queue of the module in use. Seems to me that the comment buttons would be a common want.
=-=
https://www.drupal.org/project/context_form_alteration is also worth a look.