• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Passing data from create bet to the bet page

ArcheXerxes

New Member
Sportsbook
I created radio button selection with sportsbook so users can pick the platform they want to play on. How would I go about displaying the radio button selection on the nslf_sportsbook_bet page where it displays all the info? Also if I were to use a dropdown box how would I do that as well?

HTML:
<dl class="ctrlUnit">
        <dt><label for="ctrl_bet_platform">{xen:phrase nflj_showcase_platform_choose}:</label></dt>
        <dd><ul>
            <li><label><input type="radio" name="bet_platform_type" value="playstation" id="ctrl_bet_platform_type_playstation" class="Disabler" /> {xen:phrase nflj_sportsbook_platform_playstation}</label>
                <ul id="ctrl_bet_challenger_type_open_Disabler">
                   
                </ul>
            </li>
   
            <li><label><input type="radio" name="bet_platform_type" value="xbox" id="ctrl_bet_platform_type_xbox" checked = "checked" class="Disabler" /> {xen:phrase nflj_sportsbook_platform_xbox}</label>
                <ul id="ctrl_bet_challenger_type_username_Disabler">
                   
                    <li>
                                           
                    </li>
                   
                </ul>
            </li>
            <li><label><input type="radio" name="bet_platform_type" value="nintendo" id="ctrl_bet_platform_type_nintendo" checked = "checked" class="Disabler" /> {xen:phrase nflj_sportsbook_platform_wiiu}</label>
                <ul id="ctrl_bet_challenger_type_username_Disabler">
                   
                    <li>
                       

                        <p class="explain">{xen:phrase nflj_sportsbook_bet_platform_explain}</p>                       
                    </li>
                   
                </ul>
            </li>
        </ul></dd>
    </dl>
 
huh?

Maybe explain everything you've done so far so I have a better picture of what you are trying to do (the entire customization, not just 1% of it).

What action(s) in what controller(s) have you extended?
What DataWriter(s) did you extend and what fields did you add to which tables (or are you using your own DW and a new table(s)?
What Models did you extend and did you extend any methods or add new methods? (or are you using your own model(s).
 
On the "Create a Bet" page for the betting exchange, I added a radio button selection with 3 different outputs (Playstation, Xbox, WiiU). Thats the only other option I added to your "Create a bet" page. On the page that displays the bet (nsfj_sportsbook_betex_bet), I want it to display whatever the user picked for the radiobutton (either Playstation,Xbox, or Wiiu).

Code:
What action(s) in what controller(s) have you extended?
What DataWriter(s) did you extend and what fields did you add to which tables (or are you using your own DW and a new table(s)?
What Models did you extend and did you extend any methods or add new methods? (or are you using your own model(s).
This above part I did not understand so I am guessing I will need to look into this. Is there a guide on the stuff you mentioned above or a specific name for this type of process that I can google?
 
On the "Create a Bet" page for the betting exchange, I added a radio button selection with 3 different outputs (Playstation, Xbox, WiiU). Thats the only other option I added to your "Create a bet" page. On the page that displays the bet (nsfj_sportsbook_betex_bet), I want it to display whatever the user picked for the radiobutton (either Playstation,Xbox, or Wiiu).
You can't just add stuff to an INPUT form and expect it to magically do stuff. The Input Form is part of an entire Process. When you click on SAVE, data from the form is passed into a specific Save Action in a Controller File. The Data is then evaluated, prepared and sent to a DataWriter where it is further processed (mainly to SAVE the data to the Database). Once the DataWriter has done its thing, is goes back to the Save Action in the controlled which then performs any Post Save functions and the final step is rerouting back to the Bet and rendering the Bet in its NEW State.

If you ADD something to the form, you have to do things like create a field in a database table to STORE that data. You need to modify the DataWriter (either directly or extend it) to add that new field. You need to modify or extend the controller and each action within that controller to handle the new data and you also need to modify the main template for display of the new data.

This above part I did not understand so I am guessing I will need to look into this. Is there a guide on the stuff you mentioned above or a specific name for this type of process that I can google?
This part is 90% of the total process. The form part is a very small part of the entire process. If you don't know any of this, you will have A LOT of learning to do. There are some XF programming threads/resources/guides etc at xenforo.com that will help you start learning. Kier posted an excellent howto in the development forum called "Notes" that covers pretty much everything you'd need to know/learn the process involved.
 
Back
Top