Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: mem_simple_form
John, if you are on a pre txp 4.4 version and would like to achieve the same as Jakob did, ie without using smd_tabber, look at this post
The post explains also how to pull data from smd_bio.
Last edited by hablablow (2011-05-20 08:17:58)
_
_I plant seeds for future visions. Farmer of your eyes. Subliminal engineer of your minds. eion founder__
Offline
Re: mem_simple_form
Yes, that was with smd_tabber but in the past I’ve also used jmd_dashboard. The select drop-down is constructed with normal txp-tags (i.e. not a mem-form element) using txp:images and txp:image_info, and a bit of jquery detects when you change it and carries the value over into the mem_form input box with the image number and displays the relevant image.
The only thing I wasn’t so hot on after making all that was that normally a success message shows and no form and you have to reload the tab to get your form back. To force the page to reload showing the form with the new changes incorporate, put the following in your success form:
<txp:php>header("Location: ".$_SERVER['HTTP_REFERER']);</txp:php>
A further nicety would be to put up a message via textpattern’s announce()
(or pagetop) function (the message that appears in the header) signalling that the changes have been incorporated. Stef has given me a tip but I’ve yet to try it out:
Best way is probably via a little plugin. Raise a callback on the event=admin_side, step=pagetop and try altering the value of $message if you detect a mem_form submission on the current page event.
If either of you happen to get something like that working, I’d be most grateful for some info.
TXP Builders – finely-crafted code, design and txp
Offline
Re: mem_simple_form
Hi
Had someone used this plugin to upload images to textpatern?
I succeeded to post article into textpattern table using it, but now i need to upload images also!
I found the mem_form_file, but it s made for file, i see in mem_moderation_image code that it s used to upload image, but i havent understund how it did, and which arguments to put or maybe it needs additional code??
Thanks if someone can explain or give an example.
Online
Re: mem_simple_form
Hi all.
After hundred of tests, I can’t store an email value with the default attribute. When I delete the default value attribute, my form works as expected.
Here is my recalcitrant line:
<txp:mem_form_email name="string_authorEmail" default='<txp:php> echo cbe_frontauth_whois(array('type'=>'email')); </txp:php>' max="100" required="1" class="hidden" />
Note: I have to use <txp:php>
tags otherwise with normal plugin tag author’s email isn’t displayed.
Do you have any ideas how to correct this behaviour?
Cheers,
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: mem_simple_form
… Any idea? Has anyone tried to use default value with mem_simple_form plugin in order to populate a database table?
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: mem_simple_form
Hi Patrick
I use it to populate textpatter article table without any problem!
i used it with cbe_frontauth without a problem, a code like this work :
<txp:mem_form_secret name="article_title" value='<txp:cbe_frontauth_whois type="RealName"/>' />
Cheers
Online
Re: mem_simple_form
Rabah you’re right: the use of secret tag makes the trick. I never used it before, but a very interessant plugin with lot of possibilities… Second step: I will try to add a preview before posting.
Thanks lot mate ;) Your help is much appreciated. Thanks again!
:)
Last edited by Pat64 (2011-09-26 16:31:50)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: mem_simple_form
Hi there,
Did someone manage to use it with Radio buttons I’m having a headache at pulling the selected state of two radio buttons A and B
Here’s the little monster:
<txp:mem_form_secret name="table_gender" value="" />
<txp:mem_form_radio name="table_gender" selected="1" label="A" group='<txp:smd_bio_info items="gender" author="SMD_PRIVS:2" label="">{smd_bio_gender_chosen_1}</txp:smd_bio_info>' />
<txp:mem_form_secret name="table_gender" value="" />
<txp:mem_form_radio name="table_gender" selected="0" label="B" group='<txp:smd_bio_info items="gender" author="SMD_PRIVS:2" label="">{smd_bio_gender_chosen_1}</txp:smd_bio_info>' />
Although this will output the correct gender, the choosen state is not preserved when the form is posted…
Dammit little monsters…
_
_I plant seeds for future visions. Farmer of your eyes. Subliminal engineer of your minds. eion founder__
Offline
Re: mem_simple_form
Hi all.
Do you think it is possible to create a “preview” button with mem_simple_form as the TXP commenting system offers?
Tks for your reply.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: mem_simple_form
Hello mem_simple_form users,
Would you know if a solution exist for implementing multiple forms on one page?
mem_simple_form generates an id for the form and if you place several on one page form, all forms have the same id.
An idea? Thanks
Offline
Re: mem_simple_form
'?logged-in-user'
as user login name by the variable?
Rah_function work with php function…but get_author_name is not a php function?
I don’t understand how your script work.
I hve the same problem… andi need understand the secret!
Last edited by MarcoK (2012-08-02 15:02:50)
Offline
Re: mem_simple_form
Ok, i found my answor by whaleen
Offline