"How to show in my form the number of followers for Twitter , in a non editable field ?"

  • Profile Image
    lopeze
    Asked on August 03, 2012 at 07:23 AM

    Hi, I have this javascript code:

     

    red;"> followers on Twitter

     

    I want to put in my form a not editable field that when the user writes his Twitter account (without the @) in another field, the number of followers of this account appear in the not editable field with this code. It's possible?

    Thanks.

  • Profile Image
    NeilVicente
    Answered on August 03, 2012 at 10:50 AM

    This can only be accomplished by modifying the form's source code, implementing your custom JavaScript on it, then hosting the form on your own server.

    To be honest, I am not quite familiar with Twitter's API so I don't think I can help you with this. Also, this is a little out of our scope as JotForm support staff.

    Perhaps another JotForm user, or one of our able colleagues, might have something to contribute to this topic.

  • Profile Image
    lopeze
    Answered on August 04, 2012 at 07:15 PM

    OK. Thanks!

  • Profile Image
    liyam
    Answered on August 05, 2012 at 07:15 PM

    Hello lopeze. You can try copying this code I created: http://liyam.comuf.com/jotform/twitter2.txt2

    Note: An IP can only make a request lower than 150 times per hour.  Going beyond that will make twitter block you temporarily.

    Also, the whole form is the part right within the <body> </body> tags.  Simply delete those and replace it with your own form.

    Another thing: 

    1. If your text input (for entering twitter username) does not have the ID input_1, then simply get the ID from your form, and then replace the all input_1 values in the script code with the new ID. 

    2. The counter appears at input_3 in my form.  If it's different in your form, just replace input_3 with the new textbox ID in the script

    If you need further clarification, please let us know.

  • Profile Image
    lopeze
    Answered on August 06, 2012 at 06:15 AM

    OK, I have done this, but I don't know how integrate this code in my form...

  • Profile Image
    jeanettebmz
    Answered on August 06, 2012 at 02:16 PM

    @lopeze

    First of all , and as adviced by Neil, you would need to download your form's source code , then apply the solution that Lyam has indicated.

    You would need to insert such javascript code within the <head> tags ,   your form's source code should be after </head>  within the body tags

     

    Jeanette