plugins - Send Contact form 7 data to remote server using .NET api

Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress.

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 5 years ago.

Improve this question

Problem

  • I want to send my wordpress form data to my .Net API. Link of my api

  • :49172/API/api/addonlinebookings?jsonData=@test

  • I am using Contact form 7 and also use contact form 7 to api plugin in wordpress.

Error

When form is submitted than error show in plugin

Curl error: 7 Failed to connect to remote

Error detail

If i try to send form data to my api using jquery with simple input field for testing purpose still not get any response.

<form action=":49172/API/api/addonlinebookings? 
 jsonData=@test" id="myformID">
    <input type="text" name="fname">
    <input type="submit" name="Send">
 </form>



 $(document).ready(function($){
   $("form#myformID").on( "submit", function(event){
    event.preventDefault();
    event.stopPropagation();
    alert("test");

    // Get some values from elements on the page:
    var $form = $( this ),
        $data = {
            FirstName: $form.find( "input[name='fname']" ).val()
        },
        url = $form.attr( "action" );

    // Send the data using post
    var posting = $.post( url, $data );

    posting.done(function( data ) {
        //Do whatever you need with the returned data here.
        console.log(data);
        alert(data);
    });

   });
 });

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744965880a4603674.html

相关推荐

  • plugins - Send Contact form 7 data to remote server using .NET api

    Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress.

    1天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信