alinaB
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Automatically assign custom field value of the parent to its child in CRED form
Started by: alinaB
in: Toolset Professional Support
Problem: I have a Form that is used to create posts. These posts are child posts in a one-to-many relationship with another post type, the parent post. When I create child posts in Forms, I would like to automatically set the value of one field in the child post using the value of another field in the parent post. Solution: Let's say you have a custom field in the parent post called "start-date", and you want to add that date field information to the child post in a custom field called "child-start-date". To access the parent post's custom field value, you can use the Types field shortcode with the $current_page operator like this: [types field="start-date" output="raw" item="$current_page"][/types] This will retrieve the start date field value from the parent post, since the Form you said is placed in the parent post template. To set the child post's custom field value using the parent field value, you'll use the same shortcode as above and place it in the child post Form's custom field shortcode as the value of the "value" attribute. For example: [cred_field field='child-start-date' force_type='field' class='form-control' output='bootstrap' value='[types field="start-date" output="raw" item="$current_page"][/types]'] This will set the raw value of the child date field to be equal to the raw value of the parent date field. Since you don't want this value to be editable, you can either hide the child date field with CSS or you can add readonly='true' to a cred_field shortcode to display the value, but lock it. Relevant Documentation: |
2 | 3 | 4 years, 9 months ago | ||
CRED form limit image width and height errors
Started by: alinaB in: Toolset Professional Support |
2 | 7 | 4 years, 10 months ago | ||
Cannot display current user photo from custom field with Views
Started by: alinaB in: Toolset Professional Support |
2 | 9 | 4 years, 10 months ago | ||
Cannot select user rights on Toolset Forms -> User Forms Frontend Access
Started by: alinaB in: Toolset Professional Support |
1 | 2 | 4 years, 10 months ago | ||
Limit number of characters in a WYSIWYG field in a Toolset Form
Started by: alinaB
in: Toolset Professional Support
Problem: Solution: HTML is generated on the fly by the rich text editor so you can't really limit what is being inputted. You could technically constrain the length of the output HTML, but doing so would likely result in malformed HTML that wouldn't run/render correctly. It's better falling back to a simple input in the Form, if you want to limit the number of characters added to it safely. This still requires custom code, for which you can see some examples in our forum or this very thread. |
2 | 5 | 4 years, 10 months ago | ||
CRED form featured image size limitation not working
Started by: alinaB in: Toolset Professional Support |
2 | 9 | 4 years, 10 months ago | ||
CRED dropdown conditional display of taxonomy terms based on custom field value
Started by: alinaB in: Toolset Professional Support |
2 | 10 | 4 years, 10 months ago | ||
Display child posts on parent post only if logged-in user is parent's author
Started by: alinaB in: Toolset Professional Support |
2 | 2 | 5 years ago | ||
Disallow users to “sign-up” repeatedly to the same “special activity”
Started by: alinaB
in: Toolset Professional Support
Problem: I would like to prevent my site Users from creating more than one child post for a given parent post. Solution: Create a Form that creates new child posts. Create a View of child posts, filtered by post author, where the author is the same as the current logged-in User, and also filtered by post relationship as related items of the post where the View is shown. In the "no results found" section of the View of child posts, insert the Form to create new child posts. Now the Form is only shown to those Users who have not yet created a child post for the current parent post. Relevant Documentation: |
2 | 3 | 5 years ago |