Skip to content

dimagi/rapidsms-smsforms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 

Repository files navigation

An alternative XForms application for RapidSMS.

Dependencies

  • Uses touchforms and the JavaRosa backend to play forms. JavaRosa is included in the touchforms repository.
  • Vellum, the XForm Designer, located at http://github.com/dimagi/vellum
    • Vellum is 100% client side JavaScript. Please make sure when you set up serving the files statically to serve them from <YOUR_DOMAIN>/formdesigner
    • For dev work, see below for setup instructions.

Installation

Add this project as a regular RapidSMS app. The recommended way is to add this app as a submodule to your project and ensure that it is on the PYTHON_PATH.

In your urls.py, add the following:

urlpatterns += patterns('',
    (r'^smsforms/', include('smsforms.urls'))
)

And in settings.py add the following two tabs to your RAPIDSMS_TABS:

('smsforms.views.list_forms', 'Decision Tree XForms'),
('smsforms.views.view_triggers', 'Decision Tree Triggers'),

To serve Vellum files using Django (during development only!). Add the following to your main urls.py:

FORMDESIGNER_PATH = getattr(settings, 'FORMDESIGNER_ROOT', '/ABSOLUTE/PATH/TO/VELLUM_ROOT')
if settings.DEBUG:
    urlpatterns += patterns('',
        (r'^formdesigner/(?P<path>.*)',
         'django.views.static.serve',
         {'document_root': FORMDESIGNER_PATH, 'show_indexes': True}
        ),
    )

You can now specify the location of Vellum by adding:

FORMDESIGNER_PATH = '/some/path'

to your settings.py file (useful when multiple devs are working on the same project).

Usage

Fire up your RapidSMS instance and click on the two new tabs.

  1. Create a form using the FormDesigner
  2. Add a trigger keyword for that form
  3. Send in a message to RapidSMS (with the Message Tester or other) containing only your trigger keyword.

About

An alternative XForms application for RapidSMS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published