Marylyn Lajato
Marylyn Lajato

Reputation: 1171

Is there a way on how to post data from a native mobile application then save the data through the Drupal Website?

Is there a way to post data from a native mobile application written in HTML, CSS and JQuery then save the data through the Drupal Website (particularly on the Webform module)?

Let's say, in my native mobile application, I have this set of code:

[mymobile/json-inquiry.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
  );

Then I would like to input the following data into the tables of Webforms, particularly on the webform_submitted_data. I'm having difficulty solving that kind of problem namely because there are so many relationships tied on the Webform Module. Could someone help me on this one?

Upvotes: 0

Views: 141

Answers (1)

2pha
2pha

Reputation: 10155

The Services and Webform Service or RESTful Web Services modules can help you

Upvotes: 0

Related Questions