gvanto
Forum Replies Created
-
hey @bkjohnson90,
I’ve looked at the structure of the $fields parameter, (debug output below), it’s fairly straightforward.
unset-ing an array element (each element corresponding to a field object) used to work (in NF 2.9.7) – field would simply not appear (which is desired behavior).In NF3 it breaks entire form (form not appearing at all).
Will message you on slack, thanks.
DBG: $fields= array (size=5) 0 => array (size=28) 'type' => string 'listselect' (length=10) 'order' => float 0 'fav_id' => float 0 'def_id' => float 0 'label' => string 'Department' (length=10) 'input_limit_msg' => string 'character(s) left' (length=17) 'label_pos' => string 'above' (length=5) 'list_type' => string 'dropdown' (length=8) 'multi_size' => float 5 'list_show_value' => float 1 'calc_auto_include' => float 0 'user_state' => float 0 'num_sort' => float 0 'show_help' => float 0 'show_desc' => float 0 'desc_pos' => string 'none' (length=4) 'required' => float 0 'options' => array (size=11) 0 => array (size=6) ... 1 => array (size=6) ... 2 => array (size=6) ... 3 => array (size=6) ... 4 => array (size=6) ... 5 => array (size=6) ... 6 => array (size=6) ... 7 => array (size=6) ... 8 => array (size=6) ... 9 => array (size=6) ... 10 => array (size=6) ... 'key' => string 'listselect_187' (length=14) 'objectType' => string 'Field' (length=5) 'objectDomain' => string 'fields' (length=6) 'id' => float 22 'beforeField' => string '' (length=0) 'afterField' => string '' (length=0) 'parentType' => string 'list' (length=4) 'element_templates' => array (size=2) 0 => string 'listselect' (length=10) 1 => string 'input' (length=5) 'old_classname' => string 'list-select' (length=11) 'wrap_template' => string 'wrap' (length=4) 1 => array (size=30) 'type' => string 'textarea' (length=8) 'order' => float 1 'fav_id' => float 0 'def_id' => float 0 'label' => string 'Enquiry' (length=7) 'input_limit_msg' => string 'character(s) left' (length=17) 'label_pos' => string 'above' (length=5) 'textarea_rte' => float 0 'textarea_media' => float 0 'disable_rte_mobile' => float 0 'input_limit_type' => string 'char' (length=4) 'calc_auto_include' => float 0 'num_sort' => float 0 'show_help' => float 0 'show_desc' => float 0 'desc_pos' => string 'none' (length=4) 'element_class' => string 'contact-us-enquiry' (length=18) 'required' => float 1 'key' => string 'enquiry' (length=7) 'objectType' => string 'Field' (length=5) 'objectDomain' => string 'fields' (length=6) 'manual_key' => boolean true 'admin_label' => string 'enquiry' (length=7) 'id' => float 23 'beforeField' => string '' (length=0) 'afterField' => string '' (length=0) 'parentType' => string 'textarea' (length=8) 'element_templates' => array (size=2) 0 => string 'textarea' (length=8) 1 => string 'input' (length=5) 'old_classname' => string '' (length=0) 'wrap_template' => string 'wrap' (length=4)@kbjohnson90 any ideas?
OK found the dev docs (these should be linked to from the nf.com/documentation page):
http://developer.ninjaforms.com/codex/submission-processing-hooks/now just how to turn off pesky ajax form submission?
Hmmm my ninja_forms_pre_process action is no longer triggering … Is there a new hook?
Also how to stop a form submitting with ajax? (could not see this on form settings anywhere
(but it seems like it should be an option? some NF code use:
$ajax = Ninja_Forms()->form( absint( $_POST[‘_form_id’] ) )->get_setting( ‘ajax’ ); )@kbjohnson90, that’s great – I’ll go about do some debugging to figure out how to get these (currently I loop through fields and use admin label get create a array<field_label, field_id> map.
Where is the developer documentation for v3? Couldn’t find it on the NF site … 🙁
@kbjohnson90 on a sidenote, what would be great is a way to reference form elements by name (rather than _field_{id} where id is a variable. This way programmatically fields can be referenced a lot easier
We have Save Progress addon installed too (which is not yet v3.0.19 compatible) … maybe that.
Workaround for now: Export forms in 2.9.7 and re-import in v3, seems to work semi OK (forms appear in list at least) but yeah few tweaks will be required for things to work as normal again
Hey Kyle,
Trying to upgrade from 2.9.7 (quite a big jump) – could it be because of that?
Thanks
Hi James,
“Go to Forms > Settings > Advanced and click on the Update & Convert Forms button”
I’ve upgraded to v 3.0.19 but can’t see this under Forms > Settings > Advanced ?
Thanks,
GForum: Plugins
In reply to: [WP-Polls] Polls not automatically publishingThanks Chan,
This worked.
Would be great if this was (a dropdown) setting … select your update period
Thanks, great plugin!
Forum: Plugins
In reply to: [WP-Polls] Polls not automatically publishingAh I see, thanks Lester.
I take it there isn’t a setting for this cron-polling anywhere (yet)?
So this is triggered by wp-cron.php (we have a linux cron script set up to run this every 15min)
Btw in previous version of Yoast SEO I had the following working just fine:
$ymb = new WPSEO_Metabox(); $results = $ymb->calculate_results($this->post); // deprecated fxn $is_seo_good = true; if (!is_wp_error($results)) { $score_label = WPSEO_Utils::translate_score($results['total']); if ($score_label != 'good') { $is_seo_good = false; } }Forum: Themes and Templates
In reply to: [Amethyst] Foundation 6Hey you can try: http://foundationize.com/wordpress
Forum: Plugins
In reply to: [WP Foundation Shortcodes] Foundation 6 version?Hey you can try: http://foundationize.com/wordpress
Forum: Plugins
In reply to: [WP Job Manager Registration Use Email] Plugin creates 2 email fieldsBtw – what do you mean with ‘Register form’ ? Which ‘page’ is this?
I’m referring to ‘/post-job’ (which as far as I know is where Employer posts job and registers …)