Getting Callbacks to work

Permalink Browser Info Environment
We can't get the callback function to work as described here:

https://marketplace.concretecms.com/marketplace/addons/ajax-for-expr...

We're running your code in a document ready function, the callback doesn't happen and when we look at the obj value it returns 'false'.

Type: Ticket
Status: In Progress
katalysis
View Replies:
mnakalay replied on at Permalink Reply
mnakalay
Hello.
Can you give me a copy of your code please?
mnakalay replied on at Permalink Reply
mnakalay
So the issue is the objects are set also using a document ready function so your code is running too early as the core code runs probably last.

One way would be to make sure your code comes after the main script on the page.

I am, however, looking into adding an event in the main script that could be used instead. If you're not in a hurry I should be able to have something working in a few days.

Out of curiosity, what functionality are you trying to put in place?
katalysis replied on at Permalink Reply
katalysis
That makes sense - happy to wait for the new event.

We have a couple of things to add after a successful submission, a tag for Google Tag Manager and also code that takes the form data and passes it on to Freshsales.

ATM the Freshsales code catches the form submission and passes all the spam responses over as well as the genuine ones so we're hoping that by using this with Anti Spam Master we'll be able to stop that happening.
mnakalay replied on at Permalink Reply
mnakalay
Hello. I updated the package and the documentation. Here's the link:

https://marketplace.concretecms.com/marketplace/addons/ajax-for-expr...

I hope this works for you. Please let me know if there's anything else.

concrete5 Environment Information

# Concrete Version
Core Version - 9.2.0
Version Installed - 9.2.0
Database Version - 20230308163514

# Hostname
uk1.katalysis.net

# Environment
production

# Database Information
Version: 10.4.28-MariaDB-cll-lve
SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

# Concrete Packages
Ajax Forms - Express Edition Light (2.2.2), Anti-Spammer Master (2.1.0), Hidden Data Attributes for Express (3.0.2), Katalysis Base Bootstrap (0.9.2.0.0), Katalysis Theme Bootstrap (0.0.9.0)

# Concrete Overrides
None

# Concrete Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache

# Server API
fpm-fcgi

# PHP Version
8.0.30

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, clos_ssa, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imagick, imap, intl, json, ldap, libxml, mbstring, mysqli, mysqlnd, odbc, openssl, pcre, PDO, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, redis, Reflection, session, SimpleXML, soap, sockets, sodium, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
max_multipart_body_parts - -1
memory_limit - 128M
post_max_size - 8M
upload_max_filesize - 2M
zend.exception_string_param_max_len - 0
ldap.max_links - Unlimited
mbstring.regex_retry_limit - 1000000
mbstring.regex_stack_limit - 100000
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
redis.pconnect.connection_limit - 0
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
unserialize_max_depth - 4096
opcache.jit_bisect_limit - 0
opcache.jit_max_exit_counters - 8192
opcache.jit_max_loop_unrolls - 8
opcache.jit_max_polymorphic_calls - 2
opcache.jit_max_recursive_calls - 2
opcache.jit_max_recursive_returns - 2
opcache.jit_max_root_traces - 1024
opcache.jit_max_side_traces - 128
opcache.max_accelerated_files - 10000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.