Questions about Payment Form extension

Information Requested

  • Joseph Zingarelli
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 2 months ago #160949 by Joseph Zingarelli
Information Requested was created by Joseph Zingarelli
Hi All,
I'm looking for documentation and/or examples of how to use the Custom Javascript Code tab in the Payment Form app.  Could I use javascript such as 'document.getElementById' to retrieve the value of PF fields?

The documentation for Payment Form, Supported Field Types has an example of an SQL statement that can be placed on a PF form. 
- What data is available to this query?  Can any of the _pf_ tables in the Joomla! database be queried?
 - Can the value of 'Custom Fields' be queried via SQL?  I don't see _pf_ tables that seem to be associated with 'Custom Fields.'

Any help appreciated,
Joe

 

Please Log in or Create an account to join the conversation.

  • Joseph Zingarelli
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 2 months ago #160966 by Joseph Zingarelli
Replied by Joseph Zingarelli on topic Information Requested
I see from testing that any table in the Joomla database can be queried in this manner.  I think that tables could be joined, etc and queried via this control. 
It appears that the output from the SQL query cannot be referenced with a Custom Fields control.

Please Log in or Create an account to join the conversation.

More
1 year 2 months ago #160972 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Information Requested
Hi

1. For custom javascript for each form:

You can write any custom javascript code here. It will be loaded/executed when the form is loaded.

2. For SQL Query

You can write SQL code there. However, the SQL query should return list of records, each record need to contains two fields: value, text. That will be used to generate a dropdown select field on the form (like countries, states field)

Hope my answer is clear to you

Regards,

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc