You are not logged in.
Thanks for that. I got a bit confused reading through things and thought that one replaced the other, not that the two needed to work side-by-side. Installed both and of course there are no error messages.
Thanks for your help – I’ll be playing with this over the weekend and see how it goes.
Offline
I have finally got around to using this plugin, and have figured out how to post directly to a new table in the database.
How can I (1) amend data in the table and/or (2) delete data in the table?
What I have is a website for a volunteer fire brigade. What I want is for our Captain to be able to access a page from the front end to post alerts for the day eg. total fire bans. I am use ign_password_protect to make most of the content available to members only, and will use the privileges capability to restrict this function to the Captain only. He may want to post more than one alert for the day, or modify or even delete an alert after he has initially posted it. Oh, and all of this is going in the front-end because Captains aren’t know to be the most technically savvy people!
Offline
Offline
OK, thanks. I can live with it as it is for now, but I guess I’ll start hacking around it figure it out.
Offline
Three questions about this…
1. Is there a way of posting to a date field using something other than today’s date? If I use the ‘now’ form type, it (correctly) posts today’s date, but I want people to be able to use a future date.
2. The submitted form returns a ‘thank you’ message. How can I both display the thank you message and a new instance of the blank form? This is so that someone can go and add a new set of data.
3. Hitting ‘refresh’ in the browser results in the form being submitted again. I thought this was what the nonce processing was trying to stop.
I know that smd_qeury will let me post directly to the database, but I prefer to use something like this that packages all of the functionality up.
This is my current (very simple) coding:
<txp:mem_simple_form table="alerts" id_field="name" id_insert="0">
<txp:mem_form_text name="string_alertmsg" label="Alert" required="1" />
<br />
<txp:mem_form_secreat name="now_alertdate" />
<br />
<txp:mem_form_submit />
</txp:mem_simple_form>
Thanks. AS
Offline
Hi,
Can somebody humour me and describe what this plugin does? It seems to allow people to send stuff to the textpattern database from the front end. How is this being used? I know mem moderation does something similar but (duh) has a moderation queue. It seems so useful yet I can’t fathom out why.
Thanks for any further info.
Kind regards,
Mike
Offline
mem_simple_form is a processor for mem_form that allows you to create new records in any table of Textpattern’s database. I’ve used it to allow users to create new categories and articles.
Offline
mmelon wrote:
Can somebody humour me and describe what this plugin does?
Have a look at this thread where I tried to differentiate between the different plugins. One thing I forgot to mention there is that mem_simple_form can be used for own database tables not just textpattern tables. See link below for an (admittedly rather more complex) use case.
aslsw66 wrote:
How can I (1) amend data in the table
If you mean edit a record once you have inserted it, then yes that is possible. I used the attributes id_field="ID" id_insert="0" and then set the id in your form. You need to prepopulate the form with value and default data and in my case I used smd_query to retrieve the article data for a particular article and inserted it into the form using smd_query’s {table-field} notation, e.g.
<txp:mem_form_secret name="int_ID" value="{ID}" />
The submitted form returns a ‘thank you’ message. How can I both display the thank you message and a new instance of the blank form? This is so that someone can go and add a new set of data.
Try calling the form afresh from your thanks form. I’m not sure if this will work or whether you get mismatching nonce problems but it’s easy to try. In my case above I wanted to redisplay the list so I output the list form from the thanks form.
1. Is there a way of posting to a date field using something other than today’s date? If I use the ‘now’ form type, it (correctly) posts today’s date, but I want people to be able to use a future date.
Take a look at the textpattern table and you will see that the date is a string in the form YYYY:MM:DD HH:MM.SS. You can simply write this to your string_Posted field.
TXP Builders – finely-crafted code, design and txp
Offline
Ok im confused by this. I need a form that saves the values to a table called “vote”. That table has a feild called submission. i need it to save the value of a select/combo box. Can some one help with the code?
Thanks
Offline
Trying to use a forum thread as a bug tracker doesn’t really work for various reasons.
In an effort to fix this communication disconnect, I have moved all of my plugin code over to bitbucket, /Manfre/txp-plugins. I’ve enabled the issue tracker and wiki (for documentation). With this new channel of managing my plugins, I will continue to ignore issues reported in this plugin thread, but now it will be intentional instead of accidental.
Offline