Skip to:
Content
Pages
Categories
Search
Top
Bottom

convert fields to clickable links that open in new window.

  • @quinngoldwin

    Participant

    I’m using the code from these 2 forums, can someone tell me how to convert these fields so they are clickable links. Any help would be much appreciated.

    https://buddypress.org/support/topic/how-to-add-fields-to-group-creation-with-group-extension-api-please-read/page/3/

    http://pastebin.com/Bj3aE4Q0

    	<?php $myspace = groups_get_groupmeta( $bp->groups->current_group->id, 'e2e_myspace' ); ?>
    	<label for="group-myspace">MySpace</label>
    	<input type="text" name="group-myspace" id="group-myspace" value="<?php echo $myspace ?>" />
    
    	<?php $twitter = groups_get_groupmeta( $bp->groups->current_group->id, 'e2e_twitter' ); ?>
    	<label for="group-twitter">Twitter</label>
    	<input type="text" name="group-twitter" id="group-twitter" value="<?php echo $twitter ?>" />
    
    	<?php $skype = groups_get_groupmeta( $bp->groups->current_group->id, 'e2e_skype' ); ?>
    	<label for="group-skype">Skype</label>
    	<input type="text" name="group-skype" id="group-skype" value="<?php echo $skype ?>" />
    
    
Viewing 4 replies - 1 through 4 (of 4 total)
  • @shanebp

    Moderator

    You’re showing the code for how to create field values.

    The code in the url includes example of retrieving those values.
    Just retrieve a value and wrap it in a link tag.

    @quinngoldwin

    Participant

    Thanks for the fast response shame, can you please provide me with an example on just one of them, I’ll be able to do the rest. Any help is much appreciated.

    @shanebp

    Moderator
    $group_twitter = groups_get_groupmeta( $bp->groups->current_group->id, 'e2e_twitter' );
    echo '<a href="' . $group_twitter . '">' . $group_twitter . '</a>';

    @quinngoldwin

    Participant

    Shane you are awesome man! I really appreciate you taking the time to help out. You have a wonderful week and god bless!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘convert fields to clickable links that open in new window.’ is closed to new replies.
Skip to toolbar