Git Product home page Git Product logo

detect-clicked-link's Introduction

Detect clicked link

Web form Example results

Description

This field plug-in can be used to determine how many times each link has been clicked. You can use this to make sure the enumerator has clicked on all needed links before moving on in the form.

Download now

This plug-in is currently under beta. If you you find a problem with the field plug-in, please email [email protected], or submit an issue to this GitHub repo.

Features

  • Automatically detect each link in the form by searching for the <a> HTML tag.
  • Detect the number of times a link has been clicked in a field.
  • Remembers number of times links clicked even when leaving field and coming back.
  • All of the capabilities of the select_one-select_multiple field plug-in.

Requirements

Android: Android 7 or up

iOS and web browsers: Because web browsers and iOS devices are kept more up-to-date with the latest features, nearly all web browsers and iOS devices should support the field plug-in, but test it on your collection device beforehand to be sure.

Data format

The field value will be the selected choice.

The metadata will retrieve the URL of each link, and how many times it had been clicked. Each URL-number pair will be separated by a pipe |, and within each pair, the URL and number will be separated by a space. Here is an example:

https://docs.surveycto.com/04-monitoring-and-management/01-the-basics/03a.using-data-explorer.html 1|https://docs.surveycto.com/04-monitoring-and-management/01-the-basics/04.reviewing-and-correcting.html 0

Here, the first URL has been clicked once, and the second URL has not been clicked at all.

You can use the plug-in-metadata(), item-at(), and selected() functions to retrieve the data you need. Check out our documenation on using expressions to learn about these functions. The sample form also demonstrates this for you.

How to use

Getting started

To use this plug-in as is:

  1. Download the sample form from this repo.
  2. Download the detect-clicked-link.fieldplugin.zip file from this repo.
  3. Upload the sample form to your server, with the field plug-in attached.

The field plug-in will automatically detect all links in the field using the <a> HTML tag, and it will track how many times each of those has been clicked.

Parameters

This field plug-in has no parameters.

Default SurveyCTO feature support

Feature / Property Support
Supported field type(s) select_one, select_multiple
Default values Yes
Custom constraint message Yes
Custom required message Yes
Read only Yes
media:image Yes
media:audio Yes
media:video Yes
quick appearance Yes (select_one only)
minimal appearance Yes (select_one only)
compact appearance No
compact-# appearance No
quickcompact appearance No
quickcompact-# appearance No
likert appearance Yes (select_one only)
likert-min appearance Yes* (select_one only)
likert-mid appearance No
label appearance Yes
list-nolabel appearance Yes

*Note: this plug-in works well for the likert-min appearance when the field label is short, and does not contain an image, audio, or video. This is currently a known limitation.

More resources

detect-clicked-link's People

Contributors

theomnimax avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.