Pre-fill fields for wcdocs
Imported from https://meta.trac.wordpress.org/ticket/3199 Created by @ePascalC:
Both the 'Attendee Visa letter' and 'Speaker Visa letter' are asking for information that is always the same for any request for the same WordCamp. Fields like 'WordCamp Name, WordCamp Location, WordCamp Date Start, WordCamp Date End, Organizer Name, Organizer Contacts' are the same for every Visa letter request so could be added on a 'settings' page or tab at the start of /wp-admin/admin.php?page=wcdocs
It would save time for bigger WordCamps like WCEU where several requests come in. It would also avoid spelling mistakes, decrease human errors and increase the overall consistency of the documents per WordCamp.
Using wcpt_get_wordcamp_location() to get the information might even be a better way, but for now just some fields to fill the info once would already be great.
Comment by @coreymckrill:
- Keywords set to
Needs PatchGood First Bug
I agree, this would be a helpful addition. I think get_wordcamp_post(), located in mu-plugins/helper-functions.php would make it fairly easy to grab all the necessary values for pre-populating the fields.
Comment by @ePascalC:
- Keywords set to
Good First BugHas Patch
Both Speaker and Attendee Visa letter have been adapted. Data is taken using get_wordcamp_post().
This is my first .diff so please doublecheck that it's correct. Thanks.
After just reviewing the code I saw a few things.
-
name="attendee_last_name"should be changed too in speaker-visa.php - A small coding standard issue. I would add a space between
!andemptyin!empty
Otherwise it looks good!
The changes look good. I have tested them locally too and was able to generate a PDF with the changes.
As we are adding changes we could add the WordCamp Location and WordCamp Date to the sponsor agreement too.
Comment by slackbot:
This ticket was mentioned in Slack in #meta-wordcamp by iandunn. View the logs.
Comment by @iandunn:
In [6053]:
WordCamp Docs: Rename speaker fields from "attendee" to "speaker".
This template was copied and pasted from the attendee template, and the fields were not updated at the time.
See https://meta.trac.wordpress.org/ticket/3199
Props casiepa, grapplerulrich
Comment by @iandunn:
- Status set to
closed - Resolution set to
fixed - Owner set to @iandunn
In [6054]:
WordCamp Docs: Pre-populate Speaker and Attendee visas.
Fixes https://meta.trac.wordpress.org/ticket/3199
Props casiepa, grapplerulrich
Comment by @iandunn:
- Keywords set to
Good First BugNeeds Patch - Status set to
reopened - Resolution cleared
Thanks @ePascalC and @grapplerulrich
I'm actually going to re-open this, since we can also populate the fields for the sponsorship agreement, and also pull in the organizer contact info for all the templates.
Comment by @ePascalC:
So what is missing for the sponsorship agreement is:
- The h2 title
- The 'WordCamp Date' (which would be a combination of start and end date)
- The 'WordCamp Location'
But @iandunn what do you mean by 'organizer contact info' ? I suppose you mean the last box of the Visa forms? What meta data should go in there, would that be the 'Contact Information' one (see screenshot)? [[Image()]]
Comment by @iandunn:
That's right. It'd be the E-mail Address field (not Email Address without the hyphen).
Comment by slackbot:
This ticket was mentioned in Slack in #meta-wordcamp by iandunn. View the logs.
This would be super cool for WordCamp Organizers to pre-fill fields for WC Docs. Just referring to the recent discussion in #meta-wordcamp channel in regards to WordCamp Asia 2023
@chaion07 I'm on it and the first prototype is ready! That said, I followed a slightly different approach. Instead of pre-filling for internal form, I hooked into the Jetpack form directly.
This is what I did so far:
- I created a Jetpack form that enables attendees to request an Attendee Visa Letter.
- I created an option section under
WP Admin » Tools, to allow organisers to specify on which page the request form is located and how the field names are called. - When someone requests an Attendee Visa Letter, I check if the requester holds a valid ticket to the corresponding WordCamp.
- If the requester holds a valid ticket, the Attendee Visa Letter including the name, country of origin and passport number gets sent to the requester.
- If the requester does not hold a valid ticket, an email gets sent to the requester informing them that there's no valid ticket assigned to the email address they submitted, asking them to double-check their email address or to contact the corresponding WordCamp organiser team.
So, instead of pre-filling internal form fields, to lower the manual workload for organisers, I completely bypassed that, by enabling attendees to request and receive the wanted Attendee Visa Letter without any manual involvement of the WordCamp organising team.
@nielslange did you get something ready for PR?
@nielslange did you get something ready for PR?
I don't, @timiwahalahti. For WordCamp Asia, I created a custom WordPress plugin, which is not suitable for the general WordCamp multisite. Please don't hesitate to take over this issue.
@nielslange, your solution will be a real time saver, but also it's important for each WordCamp to be able to personalize them and make them look professional, non-generic, and compliant with their national immigration authority's policies for visa letters. Particularly in Canada and the US, it has become harder to get visas, and the people requesting them are being advised and aware that they need a non-generic letter of support. There are specific recommendations for how tourist vs. business visa letters should be written that are likely to be somewhat different from country to country. I've addressed this in the Canadian context here: https://github.com/WordPress/wordcamp.org/issues/1510
@dknauss Feel free to take over this issue.