This may be a terrible way to go about population of a CF7 field… However, the way I have done so in the past is to use an identifier as the default value of the field you want to populate, for example {{cf7_year}}.
I would then use a mixture of PHP to query and get the values (if required), and format that result into a string that can in-turn be used in Javascript to replace within the document the term {{cf7_year}} with the string that you have created in PHP, or plain text, or however you’re working.
Something a bit like this:
var course_email = "<?php echo $email; ?>";
document.body.innerHTML = document.body.innerHTML.replace('{{course_email}}', course_email);
Related Posts:
- When should you, and when should you not, use wp_list_pluck()?
- Display random categories on the front page (Finding and Editing Theme Functions)
- Woocommerce add to simple product attribute programmatically [closed]
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- How to customize search result page title?
- Replacing select2 in admin backend for all selects
- Removing Unnecessary Text from Admin Menu without CSS
- Set default options for inserting media
- Default or Preset Content for Custom Post Types
- Remove tag on my RSS Feed
- Display WordPress Search
- How to add a rel attribute to images that contains their categories?
- Preferred Use of home_url()?
- Custom function for user register in wp?
- Theme-Config tab in admin Pannel?
- How to Add a Random Custom Gravatar in the WordPress Comments?
- Delete pages and Create default pages for all new network sites
- Actions according to image type and size
- Post thumbnail relative link and HTML modify
- Refactor create_function
- How to mass-delete inline styles in WordPress custom post type automatically?
- How would go about if I just want a temporary function?
- Remove the deleted users avatar from list
- How to call custom function from functions.php in site-wide template files?
- Customizer field value into functions.php variable
- PHP files included in functions.php don’t seem to work
- How Can I Expand the WordPress Customize window without any Plugin?
- Set quantity of woocommerce product on page visit [closed]
- str_replace function in theme
- WordPress shortcode attributes for database SELECT?
- is_customize_preview() like function to check if Customizer “Live Preview” in JavaScript
- Right way to update widget on dynamic new input field
- How to customly read JWPlayer’s “Playlist” items by using its “playlistid”?
- Hard-coding custom menu elements for menu manager
- Twentyten Child Theme: header images display messed up in admin panel
- How can I remove the main description text box in a Woocommerce product editor page? I only use the “Product short description” text box [closed]
- Best practices regarding the creation of custom widgets?
- Find resources dynamically loading and change or add to the url
- Word Press – Dynamic Content [closed]
- Insert image in WordPress with HTML5 tag and caption function
- how can I just add to parent theme function(s) instead of redeclaring whole the function
- Move Custom Fields on General Settings Page to New Location
- Skeleton Child Theme Add Icon Bar to Header Flex Grid
- different style sheet for just one page template
- Condition OR for current user ID
- How to retrieve the current post’s generated featured image size?
- Custom Behavior when Adding New Custom Post Type in Dashboard
- Where do I store custom functions that call custom page template files?
- Why There Is No “get content by ID” Function
- Custom HTML markup
- Use a shortcode to display custom meta box contents
- Wp-query Order By problem
- Create custom function for hero image
- Randomizing wp_tag_cloud() in child theme
- login_headertitle is deprecated since version 5.2.0
- How to append classname to body tag if guest user
- Where do I go to edit this area? [closed]
- Replace plugin function with a custom function?
- Different favicon on different pages
- Problem with images URL after filter applying
- Function to replace comment’s accented characters before posting
- How to echo Widget Title in Custom Frontend-Template Box
- New checkbox in custom widget isn’t saving data
- Linking Javascript in functions.php file
- How would I make a function to dynamically determine if user is logged to change navigation menu text?
- How to display this meta data (an array) in form of a function (created with a custom write panel)?
- How to replace ACTION url from original wordpress login form?
- Save_post – Warning: Cannot modify header information
- How to use WP conditional tag in a functions.php with OCEANWP Theme?
- Modifying a WordPress Plugin
- External api call and make global variable for any page visitor enters , page-home, page, single etc
- CSS style and app.js not loading
- Parent category as WOOCommerce Categories widget title
- Extend WordPress Audio Widget to accept HLS (.m3u8) URLs
- How Can I Concatenate A String With One Of My Custom Field Value Before Saving The Post?
- How would I correctly implement a new if statement in a child functions file?
- Woocommerce custom calculation function
- Remove all video attachment, both files and post/postmeta from database?
- WordPress Ajaxifying not working properly
- Will dequeueing in child theme functions.php file prevent Google Fonts from loading?
- True email confirmation for registration (keeping unvalidated users from user table)
- Replace image attributes for lazyload plugin on image elements with specific class
- How To Show Shortcodes In WordPress Custom Fields?
- Display page number on custom page title function
- How to make an If Else on Excerpt Filter
- Add functionality to post editor
- Get Value of Custom Field
- restrict access to specific urls on a specific period of time
- How to request login for user but not for bots
- functions.php / replacing div’s with new ones?
- Post variables not displaying correctly in custom function
- Remove snippets of JS from core
- How do I add functionality to images?
- Problem with removing characters “<” – WpAllImport
- How to crop image in WordPress with aspect ratio for any size of image
- multible shortcodes (for differnt values) with one function
- Customizer cuistom CSS Priority ordre Issue
- Copy and Modified WooCommerce function is_coupon_valid [closed]
- Advanced Custom Fields in WP_Query: Clickable Text in List Format
- Add custom css to specific user