1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Filling a field in an Overlay form when clicked

Discussion in 'Styling and Customization Questions' started by ArcheXerxes, Aug 19, 2016.

  1. ArcheXerxes

    ArcheXerxes Member

    Hello, I am just starting to dabble in Overlays. I have created a button undernath a forum users avatar that opens up an overlay form which I thought was the coolest thing ever.
    Now, on the overlay form there are two options, to have an open bet against any member or have a bet against a certain member in the forum.

    When I click the button I created, I want the open bet field to be hidden/locked and the "certain member" field to be populated with the member that is getting challenged.

    Lets say User A is browsing the forum, he comes across user C. Underneath User C 's avatar is a "Challenge Me!" button. When User A clicks the challenge me button, it opens up a form as an overlay. The "Create Open Bet" field I have (on the addon) should be locked or hidden and User C username should be populated in the "Challenge Member"field.

    How would I go about doing this
     
  2. ArcheXerxes

    ArcheXerxes Member

    This is the button that is under User B's avatar that opens up the formoverlay.

    Code:
    <div class="formOverlay">       
        <div>
            <label for="ChallengeUserBet" id="challengeButton"><a href="{xen:link betting-exchange/create}" class="OverlayTrigger inner"> {xen:phrase challenge_user}</a></label>
           
        </div>
    </div>
    When user A click the button underneath the User B's avatar, I would like this field to be autopopulated with User B's username.
    Code:
    <div>
                                <input type="search" name="bet_challenger_username" placeholder="{xen:phrase name}..." class="textCtrl AutoComplete AcSingle" data-autoSubmit="false" />
    
                            </div>
     
    Last edited: Aug 29, 2016
  3. ArcheXerxes

    ArcheXerxes Member

    @Brogan you seem to know tons of stuff about xenforo and are very active in this forum. Any idea how to do this?
     

Share This Page