This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
[closed] Display and search
Started 17 years ago by wajones | 9 posts |
-
Have there been any scripts developed to list, view and search the database by users?
Posted 17 years ago # -
I'm afraid there is no such script yet. At this moment, the only way to list/view the database is from Entry Manager -- which is only admin can do it.
This could be a nice feature to have indeed. Thanks for this, I'm putting it into our feature requests list.
MachForm Founder
Posted 17 years ago # -
Would it be possible to just tell me how I can make a displayed form read only?
Posted 17 years ago # -
I'm not sure if you just want to make the form read only or disable the form entirely.
1) If you need to disable the form, so that nobody can access it, you can do so by setting the Form Status from your Form Manager. Click the 'Disable this form' link and your form should become inactive.
2) If you need to display the form but don't want to accept submission, you will need to modify MachForm code.
a) Open this file: includes/post-functions.php
b) Around line 12 you will find the code below:$form_id = (int) trim($input['form_id']);
Now, right under that line, add this code:
if($form_id == XXX){ $process_result['status'] = false; $process_result['custom_error'] = 'This form is read only.'; return $process_result; }
Change the XXX with your form id. For example, if you have a link like this http://www.appnitro.com/demo/view.php?id=5 then your form id is 5.
This way, your form will display an error message if somebody is trying to submit your form.
MachForm Founder
Posted 17 years ago # -
Thank you, that works great.
What if I wanted to make individual fields readonly or disabled?
example:
<input id=mytext type=input size=20 value="Text input field" disabled>
Where could I insert 'disabled' in your code.
Posted 17 years ago # -
We need to do another hack for this.
All markup information are stored in includes/view-functions.php, so you will need to modify this file.
Each element has its own function. For example, 'Single Line Text' is generated by display_text() function.
Check the markup inside that function (stored in $element_markup variable) and add the necessary code there.
MachForm Founder
Posted 17 years ago # -
Figured it out, thanks for the help.
Posted 17 years ago # -
That's great. Let me know if you need further help.
MachForm Founder
Posted 17 years ago # -
Wishing for either a search or filtering function (or both :-) in the manage_entries.php script.
Posted 17 years ago #
Topic Closed
This topic has been closed to new replies.