Mu Forms
It's a WordPress plugin which designed for help WordPress users to build forms easily and export data submitted from forms in xls format.
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/mrmu/mu-forms/archive/refs/heads/master.zipReadme
Mu Forms
此外掛可協助建立收集資料用的表單,並在後台匯出 XLS 檔。 To help users build forms quickly and then export the data input from forms in xls format.
Install
- Download this plugin.
$ cd /your-wp-site-path/wp-content/plugins/mu-forms$ composer install- Activate plugin 'Mu Forms' in plugins of admin.
Usage
Admin
- Add a new Mu Form in admin.
- Add form html code in content editor.
- Add fields setting and make sure the fields' name are matched with what you write in html code.
- Fill fields settings.
Frontend Form
- Use shortcode [muform slug=mu-form-slug] to display form.
- Please build the frontend data validation by yourself.
- Please use document.do_muform_submit('your_muform', callback(result, response){...}) to submit form data to admin and get responses. For example, if the form class is "muform":
// form name is always 'form.muform'
$(document).on('submit', 'form.muform', function(e){
e.preventDefault();
if (confirm('Are you sure?')) {
// lock the submit button to prevent more clicks at the same time
$('form.muform input[type=submit]').prop('disabled', true);
document.do_muform_submit('form.muform', function(result, res){
// alert success/error message from backend
alert(res.text);
if (result === 'success') {
if (res.code == '0'){
// do sth when data err...
}
if (res.code == '1'){
// reset form fields
$('form.muform')[0].reset();
}
}else if(result === 'error') {
// do sth when ajax err ...
}
// unlock the submit button
$('form.muform input[type=submit]').prop('disabled', false);
});
}
});
Export submitted data of Mu Form
Please go to admin "Settings > Mu Form" to export to XLS.
1.0.0
Initialization