10

Dynamically Add Custom Taxonomy as Check Box Options in Gravity Forms

One of the things that makes workflows work is the removal of manual work. In this case, we want to make a simple way to track software updates. We’re using Gravity Forms to do this and we wanted to categorize the update types in a way that would help us see what was addressed by the update so we could align it to things like accessibility, security, privacy, etc. It’d also enable us to show progress in those areas pretty simply. I created a custom taxonomy for this which I called update-types. That way there’s only one place to manage these terms. I wanted any changes in this taxonomy to be automatically reflected in the Gravity Form field. That way there’s just one place to manage things. The following script ties whatever we put in that taxonomy to a checkbox field in Gravity Forms. The following example is modified from the example Gravity Forms gives you.

cartoon face eating cheetos.

Auto Featured Image for Gravity Forms Posts by Response

This scenario is fairly specific, Gravity Forms to post and adding a specific featured image based on a form field but the ease of assigning a featured image via the media post ID is hand elsewhere and it’s always nice to document more ways to tweak Gravity Forms. Step One Upload your images to the WP Media Library. After uploading the images you want to use, go to the Media Library and change the view to list view. If you mouse over the edit button, you’ll see a URL appear in the bottom right of your browser window. Setup Your Form Take note of the entry ID of the form element that’s going to determine the featured image. It’s likely the same number you’d get if you counted the fields from top to bottom but if you made them and rearranged them it could be something else. If you mouse over the field in the form editor, you’ll see the form ID in blue. The Code Now we’re just writing a bit of PHP to tie into the form. In this case I’m tying it just to form 5 with this action add_action( ‘gform_after_submission_5’, ‘altlab_timeline_featured_image’, 10, 2 );. Leaving off the _5 would apply it to all forms and changing the 5 to another number would target another form. In […]

24

Backdating a Gravity Forms Created Post

This is something that’ll come in handy with forms creating timeline events. You can add a date field to the form and this will change the post date to match it. It might work the other way too, I didn’t try that. Take note of the notes below as this is setup for the date being field one of the form and for the form having ID 5.

WordPress for Syllabus Submission

This post is specifically about addressing a syllabus submission problem but it’s worth thinking about more broadly. It should be pretty applicable to any structured data entry problem you have. These are often administrative chores (like this one) but could also be about cataloging grave markers or indexing resources or Collecting the syllabi for their department is one of those miserable things department chairs often have to do. They then need to store and reference those syllabi for a few years.1 The normal pattern is to ask people to email the syllabus and there is usually some desperate plea for a common naming convention.2 This plea is followed by ~2 people. People are bad at directions (giving and following). Email makes this basic flaw 20 times worse.3 This particular pattern for misery incarnate is repeated over and over at VCU and across universities everywhere. I recently met with a faculty member who’d at least been asked to submit the syllabus to a shared Google Drive folder but he was having issues because of directions and Google’s interface for this kind of thing being not what it might be. The department chair was also stuck with the naming convention falling apart already and they only had about 8 syllabi in there. Please don’t do that. It’s best to avoid directions as […]