# Source code

**URL:** <https://forum.dimagi.com/t/source-code/1296>\
**Category:** Users\
**Created:** [January 31, 2013, 9:43pm UTC](https://forum.dimagi.com/t/source-code/1296 "2013-01-31T21:43:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aarathi](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/a/58956e/32.png) [@Aarathi](https://forum.dimagi.com/u/Aarathi)\
**Post date:** [January 31, 2013, 9:43pm UTC](https://forum.dimagi.com/t/source-code/1296/1 "2013-01-31T21:43:01Z")

</div>

Hello,

I am new to Commcare and I was wondering if there was any way I could get  
access to the source code of the application that I am generating using the  
Commcare application builder? Is it possible to modify the application to  
add custom functions and event listeners to the buttons and textboxes  
before it is downloaded to the phone?

Thanks,  
Aarathi

---

<div class="post-metadata">

**Author:** ![czue](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/czue/32/493_2.png) [@czue](https://forum.dimagi.com/u/czue)\
**Post date:** [February 1, 2013, 2:32pm UTC](https://forum.dimagi.com/t/source-code/1296/2 "2013-02-01T14:32:59Z")

</div>

Hi Aarathi,

I'm a little confused by your question. CommCare apps are configured with  
XML files, which you can view clicking on "Deploy" and choosing "view  
source files". We do not support an easy way to do any custom functions or  
event listeners. The source code for CommCare itself (not any app) is also  
available online[1] and could possibly be modified to do what you're  
describing, though I suspect that this would be quite a lot of work.

Depending on what you're trying to do, there may be easier supported ways  
to do it with CommCare, or CommCare may not be the right tool for you.

Cory

[1] [Bitbucket](https://bitbucket.org/commcare/)

> **···**
>
> On Thu, Jan 31, 2013 at 4:43 PM, Aarathi wrote:
> 
> > Hello,
> > 
> > I am new to Commcare and I was wondering if there was any way I could get  
> > access to the source code of the application that I am generating using the  
> > Commcare application builder? Is it possible to modify the application to  
> > add custom functions and event listeners to the buttons and textboxes  
> > before it is downloaded to the phone?
> > 
> > Thanks,  
> > Aarathi
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "commcare-users" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [commcare-users+unsubscribe@googlegroups.com](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Aarathi](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/a/58956e/32.png) [@Aarathi](https://forum.dimagi.com/u/Aarathi)\
**Post date:** [February 1, 2013, 6:34pm UTC](https://forum.dimagi.com/t/source-code/1296/3 "2013-02-01T18:34:06Z")

</div>

Thanks a ton, Cory.  
I will take a look at the XML files and the source code!

Aarathi

> **···**
>
> On Friday, February 1, 2013 9:32:59 AM UTC-5, Cory Zue wrote: \> \> Hi Aarathi, \> \> I'm a little confused by your question. CommCare apps are configured with \> XML files, which you can view clicking on "Deploy" and choosing "view \> source files". We do not support an easy way to do any custom functions or \> event listeners. The source code for CommCare itself (not any app) is also \> available online[1] and could possibly be modified to do what you're \> describing, though I suspect that this would be quite a lot of work. \> \> Depending on what you're trying to do, there may be easier supported ways \> to do it with CommCare, or CommCare may not be the right tool for you. \> \> Cory \> \> [1] https://bitbucket.org/commcare/ \> \> On Thu, Jan 31, 2013 at 4:43 PM, Aarathi \<aarathi...@gmail.com wrote: \> \>\> Hello, \>\> \>\> I am new to Commcare and I was wondering if there was any way I could get \>\> access to the source code of the application that I am generating using the \>\> Commcare application builder? Is it possible to modify the application to \>\> add custom functions and event listeners to the buttons and textboxes \>\> before it is downloaded to the phone? \>\> \>\> Thanks, \>\> Aarathi \>\> \>\> -- \>\> You received this message because you are subscribed to the Google Groups \>\> "commcare-users" group. \>\> To unsubscribe from this group and stop receiving emails from it, send an \>\> email to commcare-user...@googlegroups.com . \>\> For more options, visit https://groups.google.com/groups/opt\_out. \>\> \>\> \>\> \> \>

---

<div class="post-metadata">

**Author:** ![Clayton\_Sims](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/clayton_sims/32/496_2.png) [@Clayton\_Sims](https://forum.dimagi.com/u/Clayton_Sims)\
**Post date:** [February 4, 2013, 4:59pm UTC](https://forum.dimagi.com/t/source-code/1296/4 "2013-02-04T16:59:55Z")

</div>

Aarthi,

You can modify the XML files Cory outlined to create custom functionality  
in two main ways.

The first is modifying the suite/profile files as outlined in the  
configuration files section outlined on our wiki:  
[https://bitbucket.org/commcare/commcare/wiki/CommCare20Specs](https://bitbucket.org/commcare/commcare/wiki/CommCare20Specs)

The second is modifying the XForms themselves according to the parts of the  
Spec that we support. Unfortunately we don't support the whole  
specification, so it would be useful to know what functionality you're  
hoping to add to see if we can support it.

-Clayton

> **···**
>
> On Fri, Feb 1, 2013 at 1:34 PM, Aarathi wrote:
> 
> > Thanks a ton, Cory.  
> > I will take a look at the XML files and the source code!
> > 
> > Aarathi
> > 
> > On Friday, February 1, 2013 9:32:59 AM UTC-5, Cory Zue wrote:
> > 
> > > Hi Aarathi,
> > > 
> > > I'm a little confused by your question. CommCare apps are configured with  
> > > XML files, which you can view clicking on "Deploy" and choosing "view  
> > > source files". We do not support an easy way to do any custom functions or  
> > > event listeners. The source code for CommCare itself (not any app) is also  
> > > available online[1] and could possibly be modified to do what you're  
> > > describing, though I suspect that this would be quite a lot of work.
> > > 
> > > Depending on what you're trying to do, there may be easier supported ways  
> > > to do it with CommCare, or CommCare may not be the right tool for you.
> > > 
> > > Cory
> > > 
> > > [1] [https://bitbucket.org/\*\*commcare/](https://bitbucket.org/**commcare/) [https://bitbucket.org/commcare/](https://bitbucket.org/commcare/)
> > > 
> > > On Thu, Jan 31, 2013 at 4:43 PM, Aarathi [aarathi...@gmail.com](mailto:aarathi...@gmail.com) wrote:
> > > 
> > > > Hello,
> > > > 
> > > > I am new to Commcare and I was wondering if there was any way I could  
> > > > get access to the source code of the application that I am generating using  
> > > > the Commcare application builder? Is it possible to modify the application  
> > > > to add custom functions and event listeners to the buttons and textboxes  
> > > > before it is downloaded to the phone?
> > > > 
> > > > Thanks,  
> > > > Aarathi
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "commcare-users" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to commcare-user...@\*\*[googlegroups.com](http://googlegroups.com).
> > > > 
> > > > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > > .
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google Groups  
> > > "commcare-users" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [commcare-users+unsubscribe@googlegroups.com](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
