zaus
Forum Replies Created
-
Forum: Plugins
In reply to: [Forms: 3rd-Party Integration] Any way to duplicate a Service?It’s kind of a hack (which I use frequently), but use https://wordpress.org/plugins/forms-3rdparty-migrate/ to copy and paste the appropriate section from the JSON.
But as long as the different fields have different IDs/names my plugin will only send fields if they’re present, so you can include mappings for
attachment_1andattachment_2etc in the same ‘service’. Only ifattachment_1is in the form submission will it get included, it’ll just ignoreattachment_2. I’ve used the same service setup attached to a CF7, GF, and Ninja form at the same time.Tweaking the submission url is a little different, you’d need to hook
...service_filter_url.Maybe use demo mode? https://wordpress.org/support/topic/how-to-disable-contact-form-7-from-sending-out-emails/
Otherwise I think you can use the “new” hook
wpcf7_skip_mail
https://stackoverflow.com/a/28210943/1037948Forum: Plugins
In reply to: [Forms: 3rd-Party Integration] Does it work with Caldera Forms?It’s not that I’m not interested, it’s just that I can’t commit my free time to it at the moment. And it might still be a minor thing to add it, but there’s a lot of overhead around maintaining a plugin, and I don’t want to give you a poor quality of service if I’m not able to devote enough time to help you specifically.
I’ve made it an issue as a reminder or if anyone else wants to contribute in the meantime (https://github.com/zaus/forms-3rdparty-integration/issues/85).
And it’s only because we were talking about a Caldera-specific hook that I suggested continuing your questions in that forum, as I didn’t want to give uninformed advice.
Forum: Plugins
In reply to: [Forms: 3rd-Party Integration] Does it work with Caldera Forms?At this point you’re better off posting in the Caldera forum, as this no longer deals with my plugin.
My suggestion is (if you have a test site or can do this live without affecting users) start dumping
$raw_dataand$formsetc to see what you have to work with —print_r+exit(to see it in-page) orerror_log(if you’ve enabled _WP_DEBUG_).Forum: Plugins
In reply to: [Forms: 3rd-Party Integration] PUT RequestAre you asking if you can do the following:
- Submit Form A on your website
- Send submission from Form A to Endpoint X
- Put response from Endpoint X into Form B on your website
- User updates the response in Form B and submits
- Send submission from Form B to Endpoint Y
Take a look at “Forms 3rdparty Post Again” (https://wordpress.org/plugins/forms-3rdparty-post-again/) which lets you chain submissions, including the response. So you might be able to set up a “regular” service to Endpoint X, then add another service pointing at Form B on your website which would take the response from Endpoint X. You’d need to set up Form B to allow fields to be pre-populated, configuration depending on which form plugin you’re using.
You might also be able to use “Forms 3rdparty Inject Results” (https://wordpress.org/plugins/forms-3rd-party-inject-results/) to put the response into the original Form A submission with a Gravity Forms 2-part form, but maybe not…
Forum: Plugins
In reply to: [Forms: 3rd-Party Integration] Does it work with Caldera Forms?I think the first example on the following link is what you want, posting data directly from a Caldera submission to something else:
https://calderaforms.com/doc/getting-submission-data-in-a-form-processor//** * Register processor */ add_filter( 'caldera_forms_get_form_processors', function( $processors ) { $processors['my_processor_send_to_api'] = array( 'name' => 'Remote API', 'description' => 'Send Caldera Forms Data To Remove API', 'pre_processor' => 'my_processor_send_to_api_pre_process' ); return $processors; } ); /** * Process submission * * @param array $config Processor config * @param array $form Form config * @param string $process_id Unique process ID for this submission * * @return void|array */ function my_processor_send_to_api_pre_process( $config, $form, $process_id ){ //get all form data $data = Caldera_Forms::get_submission_data( $form ); $response = wp_remote_post( 'https://service.com/api/something', array( 'body' => $data )); //If API responds with success return void if( 200 == wp_remote_retrieve_response_code( $response ) || 201 == wp_remote_retrieve_response_code( $response ) ){ return; } //find and return error if( is_wp_error( $response ) ){ $error = $response->get_error_message(); }elseif ( isset( $response[ 'error' ]) ){ $error = $response[ 'error' ]; }else{ $error = 'Something bad happened'; } //returning in pre-precess stops submission processing. return array( 'note' => $error, 'type' => 'error' ); }Forum: Plugins
In reply to: [Forms: 3rd-Party Integration] Does it work with Caldera Forms?It won’t work out of the box with another form plugin, but they generally follow similar pathways and as long as has places to hook it can be integrated. Judging by @shelob9’s (the caldera author) comment it probably has the necessary hooks. You can contact me through my site for custom integrations, or I could point you in the direction of how you’d integrate the two.
Forum: Plugins
In reply to: [Forms: 3rd-Party Integration] Passing credential?It depends on how you authorize: via basic headers? Including credentials in the request? Oauth? What crm?
Forum: Plugins
In reply to: [Forms: 3rd-Party Integration] Can’t upgrade unable to copy filesI’m pretty sure plugin authors don’t have control over plugin file permissions; that’s usually a result of manual vs automatic updates or someone making changes via ftp. Or if you make changes via a hosting file manager or some other tool.
Forum: Plugins
In reply to: [Forms: 3rd-Party Integration] Send file as multipart/form-dataThe options you’re referring to are how the file is included in the default form submission, but your question is about the submission format — you’ll want to take a look at another one of my plugins Forms 3rdparty X-Post which has an option to send the submission as multipart.
Forum: Plugins
In reply to: [Forms: 3rd-Party Integration] Vtiger Contact Form 7 and custom fieldsPlease read the sticky post in this forum. What does your debug email show as being sent as the 3rdparty submission? What’s the response from Vtiger?
I think the problem might be your “public id” mapping — to send your static value across you put the value in the “Form submission field” with ‘is value’ checked as you’ve done, but you must send it to a 3rdparty field. From their webform docs it looks like you’d map it to
publicid.Forum: Plugins
In reply to: [Forms: 3rd-Party Integration] Additional formsTake a look at https://github.com/zaus/forms-3rdparty-integration/tree/master/plugins – pick one and copy it to a new plugin or put it in the same folder (I don’t think it will delete a file that doesn’t exist in my plugin when updating). Then update all of the overridden methods to work with your contact form of choice.
Let me know how it goes, I would love to reference/link to your add-on.
Forum: Plugins
In reply to: [Contact Form 7] WordPress Contact Form 7 Radio-Button Conditional RedirectI suspect you’re comparing the wrong values. Add
console.log('radio-input', lso);to your callback, then open developer tools (<kbd>F12</kbd>, or right-click the page and choose ‘Inspect’) and go to the “Console” tab to see what it prints. Iflsois actually a number (1vs'1') update your comparison accordingly.- This reply was modified 9 years, 2 months ago by zaus.
Forum: Plugins
In reply to: [Contact Form 7] WordPress Contact Form 7 Radio-Button Conditional RedirectCF7 resets the form values as soon as a “success” response comes back from the CF7 ajax, and then it performs theon_sent_okcallback.
You can see this in lines 90 and 134 of the cf7scripts.jsfile.I’d consider this a bug, although maybe the dev thought it was ‘more secure’ to not easily allow JS access to form values; the only thing I can think to address it (other than modifying CF7 code) is asking the developer to “fix” it. Disabling AJAX in CF7 (e.g. via this plugin https://wordpress.org/plugins/contact-form-7-extras/ and there’s also adefineway to do it that I forget) might work, but more likely it will prevent the javascript callback from firing.Actually I’m wrong, I was looking at the wrong lines (it should be resetting on line 156 after performing the callback).
Forum: Plugins
In reply to: [Forms: 3rd-Party Integration] Vtiger Contact Form 7 and custom fieldsSome VTiger references:
- As a webform (see bottom section “Integrating Existing Webforms”) https://helpdocs.vtiger.com/docs/webforms
- Via REST API http://community.vtiger.com/help/vtigercrm/developers/third-party-app-integration.html
You’d set Vtiger’s “Post URL” as the service endpoint, and include the “Public Id” as a static value (check the checkbox column) in the mapping (don’t need to put it as a hidden field in your CF7 form).
Then, per the following quote, you just map each CF7 field name (the stuff in the shortcode brackets like
[your_email]without the brackets) to Vtiger’s “Webforms Reference Field” (whatever that is).Your existing form might have different field names. The names should be changed according to the Webforms Reference Field name. The values will be found in the detail view of your web form record in Vtiger CRM.
I’m assuming the ‘custom fields’ are just arbitrarily labeled input fields in Vtiger and should behave similarly.
- This reply was modified 9 years, 2 months ago by zaus.