Form names

Home Forums Guestbook Add-On Form names

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #950
    Kylie Jebb
    Participant

    I have a couple of changes I would like to do and need some help if it possible to do it.

    1) When I click on add an entry, is there a way to rename one of the form names?
    I wanted to change “Guestbook entry” to be just “Comment”. I decided it might be easier to create a new field and call it Comment but when I did that, there was no Visual formatting and Emoji which is elected to display on the original Guestbook entry form field.

    2) Is there a way I can change the style of the add a new entry button? I think it needs a bit of sexiness.

    #951
    Marcel Pol
    Keymaster

    1) You can add a PHP filter in the functions.php of your theme, preferably a child theme:

    function my_gwolle_gb_author_content_label( $label ) {
    	// $label is a string
    	$label = 'test';
    	return $label;
    }
    add_filter( 'gwolle_gb_author_content_label', 'my_gwolle_gb_author_content_label', 10, 1 );

    But you already bought the addon, so it can be much simpler. You can go to Guestbook > Add-on > Strings-tab.
    There you can replace strings, I can tell you which I have:

    Guestbook entry => Review
    guestbook entry => review
    Guestbook => Reviews
    guestbook => reviews

    2) Just trying something here:

    
    input[type="submit"], 
    input[type="button"], 
    button, 
    .btn-primary {
        border-width: 2px;
        box-shadow: inset 0px 0px 0px 2px #fff;
    }

    I can also imagine adding your logo in a small image in front of the “submit” text for every button on your website. You would need a small logo for that.
    By the way, I see you don’t have a favicon set. That image might be just the same as using one in the button.

    You have different ideas?

    #952
    Kylie Jebb
    Participant

    I have two other questions if that is ok?

    1) How do I change the write a new entry to write a new review in the button?
    2) I noticed when you do click on the write a new entry the name and email address contents default to the admin of the wordpress site. How do I change that so it displays nothing.

    Thank you so much for all your help. You have been amazing.

    #953
    Marcel Pol
    Keymaster

    Sure, no problem :)

    1) You could have this PHP code in your functions.php of the theme:

    function my_gwolle_gb_button( $button ) {
    	// $button is a string
    	$button = '
    		<div class="gwolle-gb-write-button">
    			<input type="button" name="gwolle-gb-write-button" class="button btn btn-default" value="&raquo; ' . esc_attr__('Write a new entry.', 'gwolle-gb') . '" />
    		</div>';
    
    	return $button;
    }
    add_filter( 'gwolle_gb_button', 'my_gwolle_gb_button', 10, 1 );
    

    With 4.0 this code was new, it was different before. I don’t have plans to change the defaults again, but it might happen sometime in the future. The more filters you use and deviate from the defaults, the more maintenance you might have in the future.
    You could also just use the full text on the button in that earlier “string” settingstab.

    2) That is because you are logged in, it gets filled in from your profile. If you log out or use a different browser, you will see the form fields are empty.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.