Tell us what you are trying to do?
I would like to define the details of credform within an external file and include that file to the credform interface.
Is there any way to do this?
FOR EXAMPLE: instead of going into the credform interface to change the form, all I would need to do is change the file.
Is there any documentation that you are following?
Hello and thank you for contacting the Toolset support.
I do not think this is possible. A Toolset Form needs to be generated in order to be used. There are some hidden data that are being used and that will be generated each time, like nonces. Read more about nonces here https://codex.wordpress.org/WordPress_Nonces
I hope this answers your question, let me know if you have any further questions.
Is there any toolset api or functions I can use to generate the credform outside of the toolset interface.
I enter the following in my code to used a credform : [cred-form form="jtfm-government-form" ]
Are there any short codes I could enter to do the same work this short code is doing in generating the form from its definition saved by toolset.
The form is generated through a shortcode or a Block if you are using the Blocks editor. You can use the do_shortcode function from WordPress, but you will need to load WordPress and the Toolset plugins to be able to generate the form.
https://developer.wordpress.org/reference/functions/do_shortcode/
Loading WordPress core and plugins in a custom PHP file is not officially supported by WordPress, but you may find what suits you. Check this search results:
hidden link
Ok, so if I use the block editor, can I direct the short code to look for the credform definition outside of its normal location?
The way I do it now is using this format : [cred-form form="jtfm-post-type-archive-form"] which fetches the specified cred-form from the database.
I will like to fetch the definition of cred-form ("jtfm-post-type-archive-form") from an EXTERNAL FILE.
Is this possible? Is there a short code method that allows this?
From what I understand so far. You would like to have the form on a page /form-here and you would like to submit it to another page /form-submitted-here, right?
This is not possible, the generated form and the form processing are both done on the same page, but you can configure the form to redirect to another page after form submit.
It may be possible to generate the form on a page and handle the submitting on another page, through custom coding, but this is not supported, and it may be complex or have side effects.
If you think I did not understand your question very well, please explains in detailed steps:
- I want to have ...
- I go to...
- I do...
- I want to get ...
I want to store the DEFINITION OF MY CRED FORMS in files.
I believe that when a cred form is created, its definition is stored in the database (is this correct?, please let me know otherwise).
If it is stored in the database, can you let me know where?
The bottom line is I would rather edit my credforms in my own editor instead of the toolset credform editor.
Is this possible?
Thanks.
I can't tell if it is possible or not. But I can say that it is not supported.
What I can say so far, is that a Toolset form is saved as a hidden custom post type 'cred-form' for post forms and 'cred-user-form' for user forms. As a custom post type, all the data about the form is saved inside the wp_postmeta table. I did a search on my local setup and here what I was able to find for a post form. Some setting sare saved as a serialized array. Check this screenshot hidden link
I suppose, that you will have to create forms with the Toolset editor and track what is saved on the database to understand how you can do it with your own editor.
I hope this helps. I remain at your disposal.
My issue is resolved now. Thank you! The information you provided was very helpful.