-
- What is DG3
- The different components
- Requirements for running DG3
- Installation of DG3
- Additional installation steps
- Select which web server to use
- Hello World application
- Intro to CMS
- Setting up DG3 as a CMS
- Editing pages
- More about pages and urls
- Structuring a page using the grid
- Adding menu to pages
- Add images to the application
- More formating
- Sending email from contact us
- Adding menu to template
- Deploy the web site
- Storing the pages in database
- Create record
- Auto fill field
- Field validation
- Enable save button validator
- Add new button to template
- View document
- List documents
- Fix selection in menus in template
- CRUD Create Read Update Delete
- Intro to blogs
- Add user authentication
- Bootstrap authentication
- Let user change their passords
- Add reset password
- Login dialog box
- Extending the CMS to a blog
- Extend table for blogging
- Edit blog entry
- View blog entry
- User registration
- User password validation
- User field validation
- User auto login
- User extra registration fields
Enable save button validator
When we created the page, we disabled the save button. When all fields needed are populated with values, we can enable the save button so the user can save the document. We should also make sure that document opened for editing do get the save button activated on loading. This is how to do it.
//Check for changes on any fields to check if button can be activated $('input').change(function(event) { var title = dataconnect.getfield('title').value; var slug = dataconnect.getfield("slug").value; if (title && slug) $('#save').removeAttr('disabled'); else $('#save').attr('disabled','disabled'); });<br>
Do the check when a field is changed
//Activate the button if title and slug have values if (dataconnect.getfield('title').value && dataconnect.getfield('slug').value) $('#save').removeAttr('disabled');<br>
Check on page loaded