How can I add a custom button

  • Profile Image
    Asked on November 16, 2011 at 02:33 PM


    I'm looking to add a custom button to my form and i'm not sure how

    To give you a brief explanation of what i'm tring to accomplish, I have a form that is used to log times of patient collections and instead of the user having to type in each time, I would like them to be able to just click a button and have the form register the time into the textbox instead.

    I have looked at examples on the web and have gotten them to work without issue, but if i copy the button code and javascript into my form source code, the button shows up but nothing happens when it is clicked.

    My HTML isn't the best (as you can probably tell), so please bear that in mind when it comes to answers :)

    also, the data that this form will be logging is fairly sensitive information, so i'd like to keep this form as secure as possible, I assume the https:// before"my form" is the way to go


    thanks in advance for any help

  • Profile Image
    Answered on November 16, 2011 at 07:41 PM

    On your first issue, can you provide me with the javascript / button that you were trying to integrate into your form? and also what you exactly you want it to do. We can certainly have a look to see if its anyway possible to add it to your form.

    As regards, secure URLs for your forms,'myform' or'my_form' are used for SSL forms. 

  • Profile Image
    Answered on November 17, 2011 at 03:06 PM

    sorry for the double post, it turned my answer into html when i edited my post


    Here is the code that i have used

    <title>(Type a title for your page here)</title>
    <script type="text/javascript"> 
    function show_now() { 
    var my_time = new Date();

    <input type=button value="Show Time" onclick="show_now();"> 

    and it's from this website&nbsp;

    i have removed the tags that i didn't need e.g. , etc. and inserted the function and button code into the source code of my form, in the and sections, but as i said, the button appears but does nothing when clicked

    What i want is the user to click the button, and for it to input the current time into a text box.

    I realise that the code above doesn't do that, but if i could get it to work, at least it would get me started, and i can work from there to get the rest up and running

  • Profile Image
    Answered on November 17, 2011 at 07:15 PM

    What do you mean by the ' source code of my form' of your form? 

    have you downloaded the source code files and embedded them somewhere? if so, please provide a link.

    Also, link the form you are working on as well, please


    This should  be pretty straightforward (including the updating of your field), just need where your trying to implement this.