Skip to:
Content
Pages
Categories
Search
Top
Bottom

Addressing profile fields with complex names


  • 1a-spielwiese
    Participant

    @1a-spielwiese

    Inserting into my reddle-child/buddypress/members/members-loop.php the following code:

    <?php bp_member_profile_data( 'field=Geschlecht' ); ?>

    <?php bp_member_profile_data( 'field=Jahr' ); ?>

    and

    <?php bp_member_profile_data( 'field=Bundesland, Kanton oder Wahlkreis' ); ?>

    works.

    But the following code does not work:

    <?php bp_member_profile_data( 'field=Teamgründung bzw. Geburtsjahr' ); ?>

    and

    <?php bp_member_profile_data( 'field=A:Bezirk oder Statutarstadt; CH: Bezirk o.ä.; D: LANDKREIS oder KREISFREIE STADT; Li: Gemeinde' ); ?>

    Therefore I assume, that dots with in field names (in my cases: ‘bzw.’ and ‘o.ä.’) are a problem. –

    Is there a possibility to address profile fields by other means than with their field names? Are there e.g. id-numbers or something like that, which I could use (instead of the names)?

    Cfr.:
    https://buddypress.org/support/topic/modifying-the-member-list/#post-202802

Viewing 2 replies - 1 through 2 (of 2 total)

  • 1a-spielwiese
    Participant

    @1a-spielwiese

    However, not only dots are a problem: with ‘oder Entsprechendes’ (instead of ‘o.ä.’) it doesn’t word as well.

    As well it does not work with ‘Jahr der Teamgründung oder Geburt’.

    So, maybe the length of the field names is the problem. –

    Therefore again: Is there a possibility to address profile fields by other means than with their field names? Are there e.g. id-numbers or something like that, which I could use (instead of the names)?


    1a-spielwiese
    Participant

    @1a-spielwiese

    1st:

    I tried now:

    'field_id=70'

    instead of

    'field=A:Bezirk oder Statutarstadt; CH: Bezirk o.ä.; D: LANDKREIS oder KREISFREIE STADT; Li: Gemeinde'

    It did not work. Than I changed it back to field name – and… it works now. – That the old version did not work, was maybe because there a blank was missing (‘A:Bezirk’; correct is: ‘A: Bezirk’). – But I guess, that not in all my earlier attempts this blank was missing.

    2nd:

    However, for the other field at issue still nothing else than ‘Jahr’ works.

    (I tried a lot of field names ‘Jahr der Teamgründung oder Geburt’, ‘Teamgründungs- oder Geburtsjahr’, etc. Always I used copy- & paste between the profile field and the php-file, but still the longer field names don’t work.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Addressing profile fields with complex names’ is closed to new replies.
Skip to toolbar