library/Garp/Form.php
public function addTimestampValidation() {
        // Add timestamp-based spam counter-measure
        $this->addElement(
            'hidden', self::TIMESTAMP_FIELD_KEY, array(
            'validators' => array(new Garp_Validate_Duration)
            )
        );
        // If the form is submitted, do not set the value.
        if (!$this->getValue(self::TIMESTAMP_FIELD_KEY)) {
            $now = time();
            $this->getElement(self::TIMESTAMP_FIELD_KEY)->setValue($now);
        }
    }
public function addTimestampValidation() {
        // Add timestamp-based spam counter-measure
        $this->addElement(
            'hidden', self::TIMESTAMP_FIELD_KEY, array(
            'validators' => array(new Garp_Validate_Duration)
            )
        );
        // If the form is submitted, do not set the value.
        if (!$this->getValue(self::TIMESTAMP_FIELD_KEY)) {
            $now = time();
            $this->getElement(self::TIMESTAMP_FIELD_KEY)->setValue($now);
        }
    }
public function addTimestampValidation ( ) { // Add timestamp-based spam counter-measure $ this -> addElement ( 'hidden' , self :: TIMESTAMP_FIELD_KEY , array ( 'validators' => array ( new Garp_Validate_Duration ) ) ) ; // If the form is submitted, do not set the value. if ( ! $ this -> getValue ( self :: TIMESTAMP_FIELD_KEY ) ) { $ now = time ( ) ; $ this -> getElement ( self :: TIMESTAMP_FIELD_KEY ) -> setValue ( $ now ) ; } }
Add field that records how long it took to submit the form.
This should be longer than 1 second, otherwise we suspect spammy
behavior.

@return void
Add field that records how long it took to submit the form . This should be longer than 1 second otherwise we suspect spammy behavior .