XML download of formbuilder data

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
kmesd62
Forum Members
Forum Members
Posts: 30
Joined: Sat Aug 06, 2011 3:17 pm

XML download of formbuilder data

Post by kmesd62 »

Hi

I'm looking to have a user refresh records in a local database from data being captured in formbuilder on a production cmsms site.

The refresh would be on demand from the local application. The login creds would be captured at the local end for presentation to cmsms but the user should not need to visit the cmsms site to perform the refresh.

I am expecting to use something like an xmlhttprequest object at the local end to login to cmsms and grab XML data, but my question is:

What do i need to do at the cmsms end to
a) receive/process the login (FEU or back end) and
b) render an XML response containing records from a specific formbuilder form

It would be useful to include parameters that would specify say only records created after a specified time should be returned. There is no requirement to change the data in cmsms, only download it.

It's effectively opposite of what's being discussed here: viewtopic.php?f=28&t=79412

Any suggestions or are there completely different ways i could/should be doing this?

Thanks in advance
kmesd62
Forum Members
Forum Members
Posts: 30
Joined: Sat Aug 06, 2011 3:17 pm

Re: XML download of formbuilder data

Post by kmesd62 »

So, i have done a bit more research googling (of 'cmsms' and 'xml') and found a link to an older version of FEU:https://github.com/tedkulp/FrontEndUser ... module.php. There are also some stale xml modules, but the data is going in the opposite direction.

Not checked the current FEU version yet, but the above version has an API section with a login method, so for my original question a) it looks like might be possible to:
i) create a cmsms page with a blank/empty template
ii) include the feu module tag and
iii) specify the login as an action and
iv) abstract the un/pw from the query string
v) There would be no page output as such, just some smarty to generate a response confirming to the local end whether the login was successful or not.
The above might need to be done via a tag if the api needs to be manipulated with php

So for my original question b), it looks like i might be able to do this if i
i) create a second page with a blank template
ii) add smarty/other code to check the user/requester is logged-in and a member of an 'xml-grabbers' group and return null if not
iii) extract parameters from the query string to get the form id and extract start date
iv) build a tag that extracts relevant formbuilder records (already using xml) or use the formbuilder front end template capability
v) assemble into XML and return XML data only as the response
vi) call a logout method, unless this needs to be a separate request

I have questions as to whether the login/extraction above is secure enough (site is https) and if/how it could be made more secure

Some bits of the cmsms core generate XML - e.g. module exports - could this be copied and adapted (with acknowledgement) - is this allowed?

Comments and suggestions on any of the above welcome
Post Reply

Return to “The Lounge”