Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 1,401 through 1,425 (of 3,589 total)
  • Author
    Search Results
  • #172685
    applegateian
    Participant

    Hi @henrywright-1

    Thanks for the idea.

    Pasting that in (exactly as it is) doesn’t return anything for Budget.

    How do I add the HTML I want into:

            // put whatever you want here
    

    Cheers

    Ian

    #172683
    Henry
    Member

    Hi @applegateian – I think the problem might be the snippet you’re using to output the data string.

    try doing something like this:

    if ( $items = bp_get_member_profile_data( array( 'field' => 'Budget' ) ) ) {
        foreach ( $items as $item ) {
            // put whatever you want here
            echo $item;
            // put what you want here
        }
    }

    Note: I haven’t tested.

    #172679
    applegateian
    Participant

    Not sure it’s a custom hack…

    In WordPress admin, I go to Profile Fields

    Then, I have three profile groups in there. The third one is where this budget field sits.

    It’s only available to certain user types, which is why it’s in a separate profile group.

    However, as far as I know @bphelp – none of this is custom or a hack, this is standard BP functionality? Then using this snippet to show the output on the front end:

    
    	<div id="profileProjectSize">
    		<?php 
    		$data=bp_get_member_profile_data(array('field'=>'Budget'));
    		echo $data; 
    		?>
    	</div>	
    
    #172678
    bp-help
    Participant

    @applegateian
    Maybe I am missing something here! Did you add those fields in the dashboard, or was it some custom hack?

    #172677
    applegateian
    Participant

    That’s what is strange @bphelp – when I inspect element in Chrome, there are simply no tags around the checkboxes on view profile:

    #172676
    bp-help
    Participant

    @applegateian
    If your on the view profile page and you are inspecting with dev tools you should see a tr class with the field_ID followed by td class label and td class data. You should be able to use those to your advantage.

    #172675
    applegateian
    Participant

    Sorry, meant to put @bphelp

    #172674
    applegateian
    Participant

    Hi there

    Thanks @bp-help for the response. I’m not inspecting on the edit profile page, no, because I am displaying the ‘budget’ information for site visitors.

    It’s on the view profile page ( /profile) that I am showing this field using:

    	<div id="profileProjectSize">
    		<?php 
    		$data=bp_get_member_profile_data(array('field'=>'Budget'));
    		echo $data; 
    		?>
    	</div>	

    If I go to edit profile page, I can see the following for a checkbox:

    <label><input type="checkbox" name="field_229[]" id="field_758_0" value="£0-£100k"> £0-£100k</label>

    How would I get that unique id to show on the view profile page where I am using it?

    #172673
    bp-help
    Participant

    @applegateian
    I just created a checkbox called “Sign up for our newsletter” and this is what is return when I inspect the element:

    
    <div class="editfield field_21 field_sign-up-for-our-newsletter">
    
    				
    				
    				
    				
    				
    				
    					<div class="checkbox">
    						<span class="label">Sign up for our newsletter </span>
    
    						<label><input checked="checked" type="checkbox" name="field_21[]" id="field_22_0" value="Yes"> Yes</label>					</div>
    
    				
    				
    				
    									<p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-21">
    						This field can be seen by: <span class="current-visibility-level">Anyone</span> <a href="#" class="visibility-toggle-link">Change</a>
    					</p>
    
    					<div class="field-visibility-settings" id="field-visibility-settings-21" style="display: none;">
    						<fieldset>
    							<legend>Who can see this field?</legend>
    
    							<ul class="radio"><li><label for="see-field_public"><input type="radio" id="see-field_public" name="field_21_visibility" value="public" checked="checked"> Anyone</label></li><li><label for="see-field_loggedin"><input type="radio" id="see-field_loggedin" name="field_21_visibility" value="loggedin"> Logged In Users</label></li><li><label for="see-field_adminsonly"><input type="radio" id="see-field_adminsonly" name="field_21_visibility" value="adminsonly"> Admins Only</label></li><li><label for="see-field_friends"><input type="radio" id="see-field_friends" name="field_21_visibility" value="friends"> My Friends</label></li></ul>
    						</fieldset>
    						<a class="field-visibility-settings-close" href="#">Close</a>
    					</div>
    				
    				
    				<p class="description"></p>
    			</div>
    

    I could see how this could be targeted. Are you inspecting on the edit profile page that has the checkbox’s?

    #172671
    applegateian
    Participant

    Hi @bp-help yes I have, there is no id coming through on the checkboxes, they are coming out without any html wrapped around them, eg:

    <div id="profileProjectSize">
    	£0-£100k, £100k-£500k, £500k-£2m, £2m+	
    </div>

    I can’t see how to give each one an ID
    Thanks

    #172670
    bp-help
    Participant

    @applegateian
    Have you tried using firefox in conjunction with firebug to target those elements? You could also use google chromes or IE’s dev tools.

    #172668
    applegateian
    Participant

    Hi @henrywright-1

    The site is behind a password, anywhere I can DM you?

    I just can’t see how to add a unique id to each checkbox.

    Thanks,

    Ian

    3rdaxis
    Participant

    I really appreciate your help. Thats the first bit of code that has worked to display the xprofile fields and iv tried allot.

    Im not sure if you could help me with this one aspect. I would like to also call something like google+, twitter or facebook links that I created in the xprofile fields.

    I can call those fields with the code posted here, but im wondering if @henrywright-1 or anybody stopping by this post could help with the code needed to make the called data as a link with alt text so it looks like Twitter, Google +, Facebook.

    Thanks for any help or pointers

    #172414
    Henry
    Member

    @applegateian each checkbox should have a unique ‘id’ which you can use to target specific checkboxes.

    Do you have a link to your page with the checkboxes on it?

    #172411
    applegateian
    Participant

    Sorry to chase, can anybody help clarify this? Thanks again.

    Henry
    Member

    You have to give the field a title when you add new profile fields via WP Admin > Users > Profile Fields. Whatever you’ve chosen as your field title is what you should use

    #172404
    buddhatunes
    Participant

    Any suggestions on how to do with an existing drop-down select box field type in Profile Fields?

    #172301
    applegateian
    Participant

    Thanks @modemlooper

    So the checkboxes for ‘budget’ fall under a third tab within admin:

    Would that need something different?

    #172299
    modemlooper
    Moderator

    If you are referring to what the users see and not the admin like in your screenshot you can just target with CSS no need to use a function.

    The CSS is:

    #buddypress .standard-form .field_2 div.checkbox label

    field_2 could be different depending on where you placed the checkboxes in the admin.

    #172280
    applegateian
    Participant

    Can anyone help me with this one? I know it’s probably really simple but I’m struggling to get this to work.

    Thanks

    #172271
    modemlooper
    Moderator
    // Insert New Field
    xprofile_insert_field(
        array (
               'field_group_id'  => 1,
               'name'            => 'Twitter',
               'field_order'     => 1,
               'is_required'     => false,
               'type'            => 'textbox'
        )
    );
    #172254
    pacija
    Participant

    Thank you for your reply. Unfortunately my knowledge of php and wordpress APIs is not sufficient for this. I was hoping to have something to click on, or at least some code snippet.

    Perhaps more people will find this feature useful, and someday it gets included in Buddypress.

    #172252
    Hugo Ashmore
    Participant

    You would need to build a script to map the usermeta over to bp profile fields, then they will display automatically in the profile screens.

    #172225
    bp-help
    Participant

    @serie3369
    You really should still make a child theme and add that that to it. Otherwise if you update your theme it is likely that it will be overwritten.

    #172223
    serie3369
    Participant

    FIX: I downloaded the firefox addon FireBug. I clicked on the label box for one of the Profile fields that were all showing up white text and were not able to see. This addon allows you to see where the source of the code lies. I found mine in my themes Bootstrap.min.css file. For an easier way to read your code or search for the text color, use your bootstrap.css file. But all final code changes need to be in bootstrap.min.css. My code looks like below:

    .label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#000;text-shadow:0

    I already changed the color to black, before it would’ve been #fff

Viewing 25 results - 1,401 through 1,425 (of 3,589 total)
Skip to toolbar