有没有一种方法可以从本地移动应用程序发布数据,然后通过Drupal网站保存数据



有没有办法从用HTML、CSS和JQuery编写的本地移动应用程序中发布数据,然后通过Drupal网站(特别是在Webform模块上)保存数据?

比方说,在我的原生移动应用程序中,我有一组代码:

[mymobile/json查询.js]

var inquiry = {'inq_name' : fullname, 'inq_email' : emailadd, 'inq_number': contactnum, 'inq_message' : msg };
        $.ajax({
          url: 'http://local.mywebsite.com/inq/',
          type : 'post',
          data :  inquiry,
          success : function(data) {
            console.log(data);
          }
        });
      });
    },

  $items['inq'] = array(
    'title' => 'Test1',
    'description' => 'Getting the Reservation data from the mobile app to here',
    'page callback' => array('test_inquiry1'),
    'page arguments' => array(1),
    'access callback' => TRUE,
    'access arguments' => array(1),
    'type' => MENU_CALLBACK
  );

然后,我想将以下数据输入到Webforms的表中,特别是在webform_submitted_data上。我很难解决这类问题,因为Webform模块上有太多的关系。有人能帮我做这个吗?

服务和Webform服务或RESTful Web服务模块可以帮助您