stevenjc
Forum Replies Created
-
Does anyone have experiencing with using another 2fa plugin alongside Wordfence? I’m a huge Wordfence fan and am reluctant to use another login security plugin but not seeing any response on this thread from Wordfence since Jan 2019 so assuming the ability to enforce for all roles or users, either by an update to Wordfence or via a filter, isn’t going to happen.
- This reply was modified 3 years, 10 months ago by stevenjc.
OK to follow up I have this working ok now. For reference for anyone else here’s how I did it, didn’t need to use the info from that other example or .on(‘pumBeforeOpen’).
Firstly I echoed out the values I wanted to pass to the form on the page
<span class="org_name"><?php the_title();?></span> <span class="my_emissions"><?php echo $my_emissions; ?></span>
Then I used some simple jquery to grab those values and insert them into the js variables and from there into the fields
$(document).ready(function() { var org_name = $( ".org_name" ).text(); var my_emissions = $( ".my_emissions" ).text(); $("#input_5_7").val(org_name); $("#input_5_3").val(my_emissions); });
If you’re don’t have any need to show the values on the page at all it’s even simpler, just pass the php variables directly into the js and the fields
$(document).ready(function() { var org_name = '<?php echo the_title(); ?>'; var my_emissions = '<?php echo $my_emissions; ?>'; $("#input_5_7").val(org_name); $("#input_5_3").val(my_emissions); });
- This reply was modified 4 years ago by stevenjc. Reason: adding further detail
I’m just not able to get this working. Even stripping back to trying to manually set a field value directly in js in the head of my page (instead of pulling from a variable) it isn’t passing it through to the form in the popup? Trying to prepopulate field #input_5_7 in the popup #pum-1386 with xyz.
$(document).on('pumBeforeOpen', '#pum-1386', function () { $("#input_5_7").val("xyz"); });
Am I missing something basic here?
Thanks.Thanks so much for the quick response Bel (and the fantastic plugin)
Sounds like that will do the trick for me.Another +1 for this feature. We have a few sites with multiple editors and would like to force them to use 2FA but don’t want them to have admin access. I see that they can opt-in but only admins can be forced to enable 2FA.
Would love to use the native Wordfence 2FA functionality rather than bringing another plugin into the mix.
@wfscott is there any chance this will be coming to Wordfence? Thanks.