Need help with creating a new field with custom settings

I am working on creating a new field type, with a custom setting that changes how the field renders on the front-end.

I have the field class, and the setting created and saving → but am struggling a bit to figure out how to access the setting when rendering the field so I can update how it looks.

Here is the function that is adding the setting.

add_action( 'gform_field_standard_settings', array( 'GF_Field_Neon_Payments', 'payment_methods_standard_settings' ) );
public static function payment_methods_standard_settings( $position ) {
	if ( $position === 1350 ) {
			?>
			<li class="supported_payment_method field_setting">
			<span class="section_label">
				<?php esc_html_e( 'Supported Payment Method', 'gravityformsneon' ); ?>
			</span>

				<ul>
					<li>
						<input type="radio" id="neon_ach" value="ach" name="paymentmethod" />
						<label for="neon_ach"
								class="inline"><?php esc_html_e( 'ACH/Bank', 'gravityformsneon' ); ?></label>
					</li>
					<li>
						<input type="radio" id="neon_card" value="card" name="paymentmethod" />
						<label for="neon_card"
								class="inline"><?php esc_html_e( 'Credit Card', 'gravityformsneon' ); ?></label>
					</li>
				</ul>
			</li>
		<?php
	}
}

My quandary comes in how I get the selected value from the radio buttons on the front-end when rendering the field. I’ve tried using the __get method of GF_Field, plus various ways of accessing it as a property - but everything I have tried just ends up with an empty string. Can’t find anything in the documentation or examples that shows this process either → so I’m here looking for help.

Can anyone help?

Thanks,
Ross

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.