|
Copy Parent Post Field Value to Child Post Field on CRED New Child Post Save
Started by: jonB-5
in: Toolset Professional Support
|
|
2 |
2 |
6 years, 9 months ago
Minesh
|
|
Message handling / class
Started by: matthiasG
in: Toolset Professional Support
Quick solution available
Problem:
How to add custom class name to jQuery/javascript error message generated using CRED form to validate the form
Solution:
The easiest way to add custom class name to jQuery/Javascript error message generated by CRED form is to add custom javascript/jQuery code.
You can find proposed solution, in this case, with the following reply:
=> https://toolset.com/de/forums/topic/message-handling-class/#post-620543
Relevant Documentation:
|
|
2 |
9 |
6 years, 9 months ago
matthiasG
|
|
Copy CRED save data to existing field that plugin generated
Started by: koheiY
in: Toolset Professional Support
Quick solution available
|
|
2 |
3 |
6 years, 9 months ago
koheiY
|
|
CRED: parent-child drop-down relationship
Started by: patricioC
in: Toolset Professional Support
|
|
2 |
10 |
6 years, 9 months ago
Christian Cox
|
|
How to edit Other Plugins Fields with CRED?
Started by: kalmang
in: Toolset Professional Support
Quick solution available
Problem:
I have a plugin that provides Custom user and post Fields.
I want to edit them with CRED since that allows me to bring those fields to the front end in my forms.
How?
Solution:
With CRED you can control Other Plugin's fields if you want to add or edit the values of those Fields using CRED.
Follow the DOC linked below to see how.
Note!
"Complex fields" (Like Galleries, Checkboxes or similar) cannot be controlled very well with Toolset, due to the nature of those fields.
Relevant Documentation:
https://toolset.com/documentation/user-guides/letting-cred-edit-custom-fields-created-by-other-plugins/
|
|
2 |
3 |
6 years, 9 months ago
kalmang
|
|
purchase the product user creates with CRED
Started by: pouyaR
in: Types Community Support
|
|
2 |
3 |
6 years, 9 months ago
pouyaR
|
|
concerned that users will try and change the parent post id
Started by: Nicholas
in: Toolset Professional Support
Quick solution available
Problem:
The issue here is that the user wanted to set his CRED parent field to display only.
Solution:
What I suggest is that you can replace the select with a generic one that will get the parent ID.
Replace the default one with this and let me know if the ID gets auto-assigned to this field.
[cred_generic_field field='_wpcf_belongs_product_id' type='textfield' class='parent-field-replacement' urlparam='parent_product_id']
{
"required":0,
"validate_format":0,
"default":""
}
[/cred_generic_field]
Then add this jquery to disable the field.
jQuery(".parent-field-replacement").prop("readonly", true);
|
|
2 |
5 |
6 years, 9 months ago
Nicholas
|
|
Displaying fields from Parent post in submitted form
Started by: jasonH-5
in: Toolset Professional Support
Quick solution available
Problem:
The issue here is that the user wanted to display fields from his parent post when creating a child post.
Solution:
Seeing that the parent ID would've been passed into the child CRED form then you can take a look at the link below.
https://toolset.com/forums/topic/retrieve-post-name-in-cred-form-notification/#post-618063
I was able to assist a customer with a similar query and this should be able assist you with retrieving the custom field values from the parent.
|
|
2 |
2 |
6 years, 9 months ago
Shane
|
|
Adding my own button for form submit
Started by: ThomasB2891
in: Toolset Professional Support
Quick solution available
Problem:
The issue here is that the user wanted to add his own CRED submit button to use his own custom styling.
Solution:
Actually you can replace the form submit button with an html submit button like this.
<button type="submit" name='form_submit' class="btn btn-primary">
Submit
</button>
If you replace the submit button shortcode you can use the html above instead and you should be able to customize the way you like.
|
|
2 |
5 |
6 years, 9 months ago
ThomasB2891
|
|
Need help with custom validation
Started by: frankK
in: Toolset Professional Support
|
|
2 |
10 |
6 years, 9 months ago
Beda
|
|
Set a crowdfunding goal and show progress
Started by: Nicholas
in: Toolset Professional Support
Quick solution available
Problem:
The issue here is that the user wanted to know if they could setup a crowdfunding goal with just the use of the toolset plugins only.
Solution:
This would be possible to achieve with toolset but would require some amount of work and custom coding to setup.
There are plugins out there that are dedicated for this and I was able to find one with a quick search
@https://wordpress.org/plugins/wp-crowdfunding/#description
This might be better suited for your proposed project that just using toolset alone.
|
|
2 |
5 |
6 years, 10 months ago
Nicholas
|
|
Get the ID of a youtube video and display it with a shortcode
Started by: Nicholas
in: Toolset Professional Support
Quick solution available
Problem: I have a CRED form where Users can supply the URL of a YouTube video. I would like to store the video ID in a custom field so I can use it later in a shortcode.
Solution:
Use the following cred_save_data function to parse the URL and determine the YT video ID, then save that value into a custom field on the post.
add_action('cred_save_data', 'cred_format_youtube_video_id',10,2);
function cred_format_youtube_video_id($post_id, $form_data)
{
// if a specific form
$forms = array(12,9876);
if (in_array($form_data['id'], $forms))
{
if (isset($_POST['my_custom_video_field']))
{
$link = $_POST['my_custom_video_field'];
$video_id = explode("?v=", $link); // http://www.youtube.com/watch?v=...
if (empty($video_id[1])) {
$video_id = explode("/v/", $link); // http://www.youtube.com/watch/v/..
}
if (empty($video_id[1])) {
$video_id = explode("/youtu.be/", $link); // https://youtu.be/...
}
$video_id = explode("&", $video_id[1]); // Deleting any other params
$video_id = $video_id[0]; // here is your required video ID
// update post meta with video ID
update_post_meta($post_id, '__my_custom_video_field', $video_id);
}
}
}
Change 12,9876 to be a comma-separated list of all the forms where this custom functionality should be applied.
Relevant Documentation:
http://php.net/manual/en/function.explode.php
http://php.net/manual/en/language.types.array.php
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
|
|
2 |
4 |
6 years, 10 months ago
Nicholas
|
|
CRED 1.9.4 brake the functionality of cred_save_data
Started by: davidZ-4
in: Toolset Professional Support
Quick solution available
Problem:
I am trying to: update cred to 1.9.4, I expected to see: the calculation and chart display correctly as before CRED update to version1.9.4
nnstead, I got: the calculation that worked perfectly before updating cred, (ung the cred_save_data api) ow cause the calculation to malfunction.
I have tested this in the following manner.
1. created a stagin enviroment - a copy of production
2. tested all callculation working ok on the frot end i.e. all custom functions are claculatiing and providing correct results
3. update #1 - ews plagin to 2.5.2
4. again. tested all callculation working ok on the frot end i.e. all functionalty is intact - rsults are working properly
5. update #2 - ed plagin to 1.9.4
6. again. tested all callculation working ok on the frot end - this time the claculation got broken and the rsults are not working correctly
Solution:
Here are what I found, the problem is in your custom PHP codes, plugin file functions.php, line 639!797:
// calculate education need
function calculate_education($post_ID)
{
...
}
It triggers the PHP warning message, for example:
Warning: number_format() expects parameter 1 to be float, string given in \wp-content\plugins\functions.php on line 1451
Warning: number_format() expects parameter 1 to be float, string given in \equi\wp-content\plugins\functions.php on line 1451
It is an error of your custom PHP codes, you will need to change line 650, from:
$parent_assump_post_id = wpcf_pr_post_get_belongs(get_the_ID(), 'assumption');
To:
$parent_assump_post_id = wpcf_pr_post_get_belongs($post_ID, 'assumption');
and test again
Relevant Documentation:
https://toolset.com/documentation/user-guides/cred-api/
|
|
2 |
17 |
6 years, 10 months ago
Luo Yang
|
|
Cred Form Message Title Auto Fill
Started by: dmitryK-2
in: Toolset Professional Support
Quick solution available
|
|
2 |
11 |
6 years, 10 months ago
dmitryK-2
|
|
How to send a notification before a post expires?
Started by: Timothy
in: Toolset Professional Support
Quick solution available
|
|
4 |
20 |
6 years, 10 months ago
Nigel
|