• Resolved limited4

    (@limited4)


    I’ve created a custom tab under account with code:

    add_filter('um_account_page_default_tabs_hook', 'TVTicker_tab', 100 );
    function TVTicker_tab( $tabs ) {
    	if ( is_user_logged_in() && wp_get_current_user()->roles[0] != 'customer') {
    		$tabs[810]['TVTicker']['icon'] = 'fas fa-cloud';
    		$tabs[810]['TVTicker']['title'] = 'Trading View Ticker Options';
    		$tabs[810]['TVTicker']['custom'] = true;
    		$tabs[810]['TVTicker']['submit_title'] = "Save Ticker Options";
    	}
    	return $tabs;
    }
    
    add_action('um_account_tab__TVTicker', 'um_account_tab__TVTicker');
    function um_account_tab__TVTicker( $info ) {
    	global $ultimatemember;
    	extract( $info );
    
    	$output = $ultimatemember->account->get_tab_output('TVTicker');
    	if ( $output ) { 
    		echo $output; 
    	}
    }
    
    add_filter('um_account_content_hook_TVTicker', 'um_account_content_hook_TVTicker');
    function um_account_content_hook_TVTicker( $output ) {
    	ob_start();
    	?>
    		<div class="um-field">
    		</div>
    	<?php
    		
    	$output .= ob_get_contents();
    	ob_end_clean();
    	return $output;
    }

    works fine, but i also want to add the following form:

    <div class="um-field um-field-Ticker_Options um-field-checkbox um-field-type_checkbox" data-key="Ticker_Options">
        <div class="um-field-label">
            <label for="Ticker_Options-571">Trading View Ticker Options</label>
            <div class="um-clear"></div>
        </div>
        <div class="um-field-area">
            <label class="um-field-checkbox  um-field-half ">
                <input type="checkbox" name="Ticker_Options[]" value="BTCUSD">
                <span class="um-field-checkbox-state">
                    <i class="um-icon-android-checkbox-outline-blank"></i>
                </span>
                <span class="um-field-checkbox-option">BTCUSD</span>
            </label>
            <label class="um-field-checkbox  um-field-half right active">
                <input type="checkbox" name="Ticker_Options[]" value="BTCGBP">
                <span class="um-field-checkbox-state">
                    <i class="um-icon-android-checkbox-outline"></i>
                </span>
                <span class="um-field-checkbox-option">BTCGBP</span>
            </label>
            <div class="um-clear"></div>
            <label class="um-field-checkbox  um-field-half ">
                <input type="checkbox" name="Ticker_Options[]" value="BTCEUR">
                <span class="um-field-checkbox-state">
                    <i class="um-icon-android-checkbox-outline-blank"></i>
                </span>
                <span class="um-field-checkbox-option">BTCEUR</span>
            </label>
            <label class="um-field-checkbox  um-field-half right active">
                <input type="checkbox" name="Ticker_Options[]" value="ETHUSD">
                <span class="um-field-checkbox-state">
                    <i class="um-icon-android-checkbox-outline"></i>
                </span>
                <span class="um-field-checkbox-option">ETHUSD</span>
            </label>
            <div class="um-clear"></div>
            <label class="um-field-checkbox  um-field-half ">
                <input type="checkbox" name="Ticker_Options[]" value="ETHGBP">
                <span class="um-field-checkbox-state">
                    <i class="um-icon-android-checkbox-outline-blank"></i>
                </span>
                <span class="um-field-checkbox-option">ETHGBP</span>
            </label>
            <label class="um-field-checkbox  um-field-half right">
                <input type="checkbox" name="Ticker_Options[]" value="ETHBTC">
                <span class="um-field-checkbox-state">
                    <i class="um-icon-android-checkbox-outline-blank"></i>
                </span>
                <span class="um-field-checkbox-option">ETHBTC</span>
            </label>
            <div class="um-clear"></div>
            <label class="um-field-checkbox  um-field-half ">
                <input type="checkbox" name="Ticker_Options[]" value="LTCUSD">
                <span class="um-field-checkbox-state">
                    <i class="um-icon-android-checkbox-outline-blank"></i>
                </span>
                <span class="um-field-checkbox-option">LTCUSD</span>
            </label>
            <label class="um-field-checkbox  um-field-half right">
                <input type="checkbox" name="Ticker_Options[]" value="LTCBTC">
                <span class="um-field-checkbox-state">
                    <i class="um-icon-android-checkbox-outline-blank"></i>
                </span>
                <span class="um-field-checkbox-option">LTCBTC</span>
            </label>
            <div class="um-clear"></div>
            <label class="um-field-checkbox  um-field-half ">
                <input type="checkbox" name="Ticker_Options[]" value="EOSUSD">
                <span class="um-field-checkbox-state">
                    <i class="um-icon-android-checkbox-outline-blank"></i>
                </span>
                <span class="um-field-checkbox-option">EOSUSD</span>
            </label>
            <label class="um-field-checkbox  um-field-half right">
                <input type="checkbox" name="Ticker_Options[]" value="EOSBTC">
                <span class="um-field-checkbox-state">
                    <i class="um-icon-android-checkbox-outline-blank"></i>
                </span>
                <span class="um-field-checkbox-option">EOSBTC</span>
            </label>
            <div class="um-clear"></div>
            <label class="um-field-checkbox  um-field-half ">
                <input type="checkbox" name="Ticker_Options[]" value="TRXUSD">
                <span class="um-field-checkbox-state">
                    <i class="um-icon-android-checkbox-outline-blank"></i>
                </span>
                <span class="um-field-checkbox-option">TRXUSD</span>
            </label>
            <label class="um-field-checkbox  um-field-half right">
                <input type="checkbox" name="Ticker_Options[]" value="TRXBTC">
                <span class="um-field-checkbox-state">
                    <i class="um-icon-android-checkbox-outline-blank"></i>
                </span>
                <span class="um-field-checkbox-option">TRXBTC</span>
            </label>
            <div class="um-clear"></div>
            <label class="um-field-checkbox  um-field-half ">
                <input type="checkbox" name="Ticker_Options[]" value="ADAUSD">
                <span class="um-field-checkbox-state">
                    <i class="um-icon-android-checkbox-outline-blank"></i>
                </span>
                <span class="um-field-checkbox-option">ADAUSD</span>
            </label>
            <label class="um-field-checkbox  um-field-half right">
                <input type="checkbox" name="Ticker_Options[]" value="ADABTC">
                <span class="um-field-checkbox-state">
                    <i class="um-icon-android-checkbox-outline-blank"></i>
                </span>
                <span class="um-field-checkbox-option">ADABTC</span>
            </label>
            <div class="um-clear"></div>
            <label class="um-field-checkbox  um-field-half ">
                <input type="checkbox" name="Ticker_Options[]" value="BCHUSD">
                <span class="um-field-checkbox-state">
                    <i class="um-icon-android-checkbox-outline-blank"></i>
                </span>
                <span class="um-field-checkbox-option">BCHUSD</span>
            </label>
            <label class="um-field-checkbox  um-field-half right">
                <input type="checkbox" name="Ticker_Options[]" value="BCHBTC">
                <span class="um-field-checkbox-state">
                    <i class="um-icon-android-checkbox-outline-blank"></i>
                </span>
                <span class="um-field-checkbox-option">BCHBTC</span>
            </label>
            <div class="um-clear"></div>
            <label class="um-field-checkbox  um-field-half ">
                <input type="checkbox" name="Ticker_Options[]" value="XRPUSD">
                <span class="um-field-checkbox-state">
                    <i class="um-icon-android-checkbox-outline-blank"></i>
                </span>
                <span class="um-field-checkbox-option">XRPUSD</span>
            </label>
            <label class="um-field-checkbox  um-field-half right">
                <input type="checkbox" name="Ticker_Options[]" value="XRPBTC">
                <span class="um-field-checkbox-state">
                    <i class="um-icon-android-checkbox-outline-blank"></i>
                </span>
                <span class="um-field-checkbox-option">XRPBTC</span>
            </label>
            <div class="um-clear"></div>
            <div class="um-clear"></div>
        </div>
    </div>

    and have the fields save to the metakey as an array, so i can then in another php script call the metakey and explode the array and use the saved values, any help?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Anyone?

    I am curious how you can do this as well?

    Or even more so, how you can pull other custom content from WP (like Gravity Forms submissions/entries, Page/Post content, etc)?

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi Everyone,

    Sorry for the late response as we are keeping up with the support backlogs.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??

    Regards,

    • This reply was modified 4 years, 10 months ago by Champ Camba.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Account Tab with Custom Field’ is closed to new replies.