• Home
  • Blog
  • Documentation
  • FAQ
    • Pre-Sales Questions
  • Sign Up
  • Log Out
  • Get Easy Forms
  • Home
  • Blog
  • Documentation
  • FAQ
    • Pre-Sales Questions
  • Sign Up
  • Log Out
  • Get Easy Forms
home/Knowledge Base/Advanced Techniques
Popular Search:Getting Started

Auto-Fill a Form Using the Form Widget

409 views January 1, 2019 October 1, 2020 admin 5

To set the Default Values, copy & paste the Form embed code and find the line with the key: ‘height‘. Below this line add the next code to populate a text field with the ID: ‘text_0’.

'defaultValues': {
    'text_0': 'This is my default value'
}

Note: You can find the field ID in Form Builder -> Code tab.

See the example below to understand how to set the Default Values object.

var s = d.createElement(t), options = {
  'id': 1,
  'container': 'c1',
  'height': '500px',
  'defaultValues': {
    'text_0': 'This is my default value',
    'checkbox_0': true,
    'select_0': 'Second Option'
  }
  'form': '//example.com/app/embed'
};

How to pass PHP variables to the Form Widget

For this tip, you need to add an embed code to a PHP webpage, then you need to customize the embed code to add the defaultValues object and print the PHP variables. Eg.

'defaultValues': {
    'text_0': '<?= $_GET['lname'] ?>'
}

Was this helpful?

5 Yes  1 No
Related Articles
  • Create Users that Can Only Submit Forms
  • How To Calculate Age From Date Of Birth
  • Calculate the Number of Days between Two Dates
  • Create Users that Only Can Manage Form Submissions of Shared Forms
  • Reject Email Addresses From Specific Domains
  • How to Display Radio Buttons as Buttons
Advanced Techniques
  • Auto-Fill a Form Using the Form Widget
  • Create Users that Can Only Submit Forms
  • How To Calculate Age From Date Of Birth
  • Calculate the Number of Days between Two Dates
  • Create Users that Only Can Manage Form Submissions of Shared Forms
  • Reject Email Addresses From Specific Domains
View All 16  
Popular Articles
  • How to enable / disable DEBUG mode
  • How to update Form Stats from the command line
  • How to RTL (right-to-left) a Form?
  • How to Remove the Default Choice from a Select List Field
  • How to Insert an Image into a Notification or Confirmation Email
KB Categories
  • Add-Ons
  • Advanced Techniques
  • Common Issues & Troubleshooting
  • Developers "How To's"
  • How To
About Easy Forms

With Easy Forms you can create unlimited web forms and most importantly the complete management of them without paying monthly fees

Resources
  • Knowledge Base
  • Documentation
  • Pre-sales Questions
  • Blog
Useful Help Links
  • Get Easy Forms
  • Live Demo
  • License Terms
  • Contact Us
Frequent Visit Links
  • Pre-Sales Questions
  • System Requirements
  • Installing Easy Forms
  • Upgrading Easy Forms
  • Privacy Policy
  • © 2015 - 2020 Baluart EIRL. All Rights Reserved.