The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
3 posters

    Change Contact Field

    TamDonCo
    TamDonCo
    Forumember


    Posts : 427
    Reputation : 2
    Language : English

    Solved Change Contact Field

    Post by TamDonCo September 13th 2016, 2:54 am

    Hi All

    How do I get and change "contact field" in profile section

    Change Contact Field Vgc

    e.g : I would to change Pinterest field from 12345 to 12345-67890

    I saw the code to change "Always allow HTML" some where before


    Last edited by TamDonCo on September 13th 2016, 10:39 pm; edited 1 time in total
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Change Contact Field

    Post by SLGray September 13th 2016, 6:58 am

    I do not understand what you want? All you have to do is enter the link, exactly just the last part of the link, to your Pinterest profile in the field.



    Change Contact Field Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    TamDonCo
    TamDonCo
    Forumember


    Posts : 427
    Reputation : 2
    Language : English

    Solved Re: Change Contact Field

    Post by TamDonCo September 13th 2016, 3:10 pm

    SLGray wrote:I do not understand what you want? All you have to do is enter the link, exactly just the last part of the link, to your Pinterest profile in the field.

    I want to change the value of that field from current value to a new value
    TamDonCo
    TamDonCo
    Forumember


    Posts : 427
    Reputation : 2
    Language : English

    Solved Re: Change Contact Field

    Post by TamDonCo September 13th 2016, 6:17 pm

    This is the code from Ange Tuteur to enable HTML for users and it works

    Code:
    // auto enable HTML in the preferences
    (function($) {
      if (my_getcookie('faAutoHTML') != 'checked') {
        $.get('/profile?mode=editprofile&page_profil=preferences', function(d) {
          d = $('#ucp', d).serialize(); // serialize form data for submission
       
          /allowhtml=0/.test(d) && $.post('/profile', d.replace(/allowhtml=0/, 'allowhtml=1') + '&submit=1'); // if HTML is disabled we'll submit the modified form data
       
          my_setcookie('faAutoHTML', 'checked'); // set a cookie to prevent constant checks
        });
      }
    })(jQuery);
    // par ange tuteur



    and this is my test but it does not work

    Code:
    $(document).ready(function($){


          var id = _userdata.user_id ;

        $.get('/u' + id + '/profile?mode=editprofile&page_profil=informations', function (e) {
     
            e = $('#ucp', e).serialize(); // serialize form data for submission
            $.post('/profile', e.replace(/profile_field_3_-23=12345/, 'profile_field_3_-23=12345:67890') + '&submit=1');

        });


    });


    where profile_field_3_-23 is field ID of Pinterest
    TamDonCo
    TamDonCo
    Forumember


    Posts : 427
    Reputation : 2
    Language : English

    Solved Re: Change Contact Field

    Post by TamDonCo September 13th 2016, 10:39 pm

    never mind, I found the problem

    Thanks anyway
    Nemo
    Nemo
    Active Poster


    Male Posts : 1203
    Reputation : 119
    Language : Greek, English, French

    Solved Re: Change Contact Field

    Post by Nemo September 14th 2016, 10:04 pm

    Since no solution was provided, this topic will be garbaged.

    Hello

      Current date/time is September 22nd 2024, 5:19 pm