Textpattern Forum

You are not logged in. Register | Login | Help

#41 2009-11-20 23:08:28

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 313

Re: mem_simple_form

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

#42 2010-01-27 22:05:03

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 313

Re: mem_simple_form

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

#43 2010-01-28 00:05:46

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_simple_form

@aslsw66, this plugin does not provide (1) or (2).

Offline

#44 2010-01-28 06:37:15

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 313

Re: mem_simple_form

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

#45 2010-02-04 20:46:58

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 313

Re: mem_simple_form

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

#46 2010-06-24 20:52:29

mmelon
Member
Registered: 2006-03-02
Posts: 64

Re: mem_simple_form

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

#47 2010-06-24 21:03:24

johnstephens
Plugin Author
From: Harrisonburg, VA
Registered: 2008-06-01
Posts: 820
Website

Re: mem_simple_form

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

#48 2010-06-25 08:04:00

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 1,895
Website

Re: mem_simple_form

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

#49 2010-08-13 12:01:45

CodeWalker
Member
From: Hampshire, UK
Registered: 2010-01-08
Posts: 64
Website

Re: mem_simple_form

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

#50 2010-10-03 15:48:04

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_simple_form

Trying to use a forum thread as a bug tracker doesn’t really work for various reasons.

  1. I don’t always get the email about the thread being updated.
  2. Different problems get interleaved.
  3. I’m forget about them and don’t re-read the older pages of a plugin thread looking for unfixed issues.

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

Board footer

Powered by FluxBB