Adding row/image/div in registration table Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

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.
2 posters

    Adding row/image/div in registration table

    Kami-sama
    Kami-sama
    Forumember


    Female Posts : 407
    Reputation : 12
    Language : EN, RU, DE, LT
    Location : Lithuania

    Solved Adding row/image/div in registration table

    Post by Kami-sama June 8th 2017, 9:03 pm

    Technical Details


    Forum version : #phpBB2
    Position : Founder
    Concerned browser(s) : Google Chrome
    Who the problem concerns : Yourself
    Forum link : ( link is hidden, you must reply to see )

    Description of problem

    Hello!

    I would like to add either a separate row, or an image, or a DIV in the registration table. Basically - a title before specific profile settings.

    After user has agreed to terms and conditions, a window with mandatory user details is displayed. I want to insert custom content here. The main issue - there are no ID's on TR elements. I have tried something like this:

    Code:
    //Code by KamiSama
    $(document).ready(function(){
    if(document.URL.indexOf("http://URL/register?agreed=true&step=2") >= 0){
    $('#profile_field_7_7').css({"background-image": "url('https://i.solidfiles.com/BzmjXA3DzmWgV.png')", "height" : "60px", "width" : "260px"});

    var insert = '<tr><td class="gen row1" align="left"><span><span style="color:#292929;">Kraujas</span>&nbsp;* : </span></td><td class="gensmall row2"><select class="gensmall" id="profile_field_7_7" name="profile_field_7_7" size="1" style="background-image: url(https://i.solidfiles.com/BzmjXA3DzmWgV.png); height: 60px; width: 260px;"><option value="">No choice</option><option value="0">Grynakraujė</option><option value="1">Grynakraujis</option><option value="2">Purvakraujė</option><option value="3">Purvakraujis</option><option value="4">Maišyta</option><option value="5">Maišytas</option><option value="6">Nevertėlė</option><option value="7">Nevertėlis</option><option value="8" selected="selected">Žiobaras</option></select><br><span class="gensmall">Kokia tavo personažo kilmė?</span></td></tr>';
    var new_row = insert.parentNode.insertRow( insert.rowIndex + 1 );
    new_row.insertCell(0).innerHTML = "test";
    new_row.insertCell(1).innerHTML = "test2";
       
    }
    });


    Background replacement works perfectly, yet adding a new row is a bit more difficult. Any ideas?


    Last edited by Kami-sama on June 9th 2017, 9:33 pm; edited 1 time in total
    Kami-sama
    Kami-sama
    Forumember


    Female Posts : 407
    Reputation : 12
    Language : EN, RU, DE, LT
    Location : Lithuania

    Solved Re: Adding row/image/div in registration table

    Post by Kami-sama June 9th 2017, 5:26 pm

    The only work around I thought of is creating a separate Image choice option with only one choice set already on default. The main issue with this:

    - row1 (left side) still there. No way to delete it. Even setting on "only icon" during registration text shows up
    - there is "selected choice" blue dot next to the option. Removing or chaining HTML does not allow user to ho ahead with registration.... EDIT:: found how to remove it without any harm to registration:
    Code:
    $( "#profile_field_8_20 input" ).css("opacity", "0");
    avatar
    Guest
    Guest


    Solved Re: Adding row/image/div in registration table

    Post by Guest June 9th 2017, 9:24 pm

    Hello,

    You got the problem solved or you still need help? If you need to add a div to a certain element, you have to do something like this:
    Code:
    $("selector").append("<div></div>")
    Kami-sama
    Kami-sama
    Forumember


    Female Posts : 407
    Reputation : 12
    Language : EN, RU, DE, LT
    Location : Lithuania

    Solved Re: Adding row/image/div in registration table

    Post by Kami-sama June 9th 2017, 9:29 pm

    Yeah. I kinda did. Workarounds FTW ;D
    Too bad there is no better way to do this.
    But for time being this is SOLVED Wink

    P.S. If anyones interested, for the left side I used:
    Code:
    $('#form_register span:contains("______________")').css("opacity", "0");

    (Here the profile field name is "____________")
    SLGray
    SLGray
    Administrator
    Administrator


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

    Solved Re: Adding row/image/div in registration table

    Post by SLGray June 9th 2017, 11:33 pm

    Problem solved & topic archived.
    Please read our forum rules: ESF General Rules



    Adding row/image/div in registration table Slgray10

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