Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2009-11-20 22:39:28

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

Re: mem_simple_form

I’m returning to TXP after a break of many years…

I have just installed this plugin but I get some error messages before I even try to ushttp://forum.textpattern.com/post.php?action=post&tid=28386e the tags!

These are the errors I’m getting:

A problem occured while loading the plugin: mem_simple_form -> User_Error: Unable to include required plugin "mem_form" on line 498
C:\xampp\xampp\htdocs\textpattern\lib\txplib_misc.php:498 trigger_error()
C:\xampp\xampp\htdocs\textpattern\lib\txplib_misc.php(594) : eval()'d code:60 require_plugin()
C:\xampp\xampp\htdocs\textpattern\lib\txplib_misc.php:594 eval()
C:\xampp\xampp\htdocs\textpattern\publish.php:117 load_plugins()
C:\xampp\xampp\htdocs\index.php:44 include()

I’m setting this up on a development site sitting on XAMPPP. The only other plugins I’m using are:
  • ign_password_protect
  • smd_admin_themes
  • zem_contact_reborn
  • zem_contact_lang

The error message appears regardless of whether I have logged in or not.

Not a good start (I can’t even start to get my hands dirty – and then I will really have some questions).

Any idea what could be generating these errors? Apart from this minor problem, this plugin looks like it will neatly plug a requirement for me.

Thanks

Offline

#38 2009-11-20 22:41:20

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

Re: mem_simple_form

A problem occured while loading the plugin: mem_simple_form -> User_Error: Unable to include required plugin “mem_form” on line 498

Offline

#39 2009-11-20 22:43:57

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

Re: mem_simple_form

When it says “user error”, does that mean me? ie. something I have done? It’s possible of course, as I’m still feeling my way around TXP, but I have barely touched anything apart from the plugins I mentioned.

Offline

#40 2009-11-20 23:02:32

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: mem_simple_form

You just need the mem_form plugin as well which is a requirement of mem_simple_form


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

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

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

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: 342
Website

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: 342
Website

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: 342
Website

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: 95

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: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
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
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,595
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

Board footer

Powered by FluxBB