Disclaimer: This site is moderated by the Formidable Forms community. Formidable Forms and its parent company Strategy11 are not responsible for the words, opinions, and content posted by others on this site. This site is provided as a courtesy and free resource for the Formidable Forms Community. Any actions deemed as harassment, toxic or abusive, will result on being banned from this site and potentially losing your Formidable Forms license.
Thanks for your cooperation, if you have any questions please
consult our code of conduct
I don't know of a simple or example solution for this. Custom code can surely do something for you. Let me ask a question though. How does a non-user know how to submit the form. Are you going to write up some text?
A version of this code can put in place a class that you could then disable with JS/JQuery: https://formidableforms.com/knowledgebase/frm_submit_button_class/#kb-add-a-class-to-a-single-submit-button
Maybe something this:
add_filter('frm_submit_button_class', 'add_submit_class', 10, 2);
function add_submit_class( $classes, $form ){
if ( $form->id == 123 ) {
if ( is_user_logged_in() ) {
$classes[] = 'my-custom-enabled-class';
} else {
$classes[] = 'my-custom-disabled-class';
}
}
return $classes;
}
Then maybe something like this:
jQuery(function(){
jQuery("input.my-custom-disabled-class").attr("disabled", true);
});
Yes, the goal is to have the poll visible on a post directing viewers to login to vote. I was hoping it could be done using conditional logic within the buttons field.