Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
More (or again) on using php in txp
Hi, I searched but didn’t find answer to this:
before using txp, I would normaly made a contact.html page and contact.php page, and in my contact form action=“contact.php”.
Now, I made contact section in txp, and contact page, and linked them together. So, now when user click on send button, what is the best way to link those to pages?
I already tried just to upload contact.php file on the server, and in action I puted “http://www.mysite.com/contact.php and that is working, but now that file is practicly outside of txp.
Is this the best way to do this or is there anything else?
ps.
I know about plugins, but I want to use my own code
pps.
I also know that this could be done in one page, but I’m not that good in php
Thanks
Offline
Re: More (or again) on using php in txp
try zem_contact_reborn plugin it did what you want inside txp
Cheers
Offline
Re: More (or again) on using php in txp
Second what Dragondz says. Don’t bother with your own code, use ZCR instead.
Offline
Re: More (or again) on using php in txp
Ok, I’ll try, but I would still like to know to do it the other way,
Thanks.
Offline
Offline
Re: More (or again) on using php in txp
if you really want to use your own contact.php for whatever reason then thats fine. you’ll just have to link to it directly. theres no reason to bring it ‘into’ textpattern. but seeing as you claim to be not good at php, its probably a bad idea anyway.
Offline
Re: More (or again) on using php in txp
Gocom wrote:
Tell us why. Little explanation would be great, because I don’t get it why you want make things harder.
Cheers!
Well, I tought becouse I have another form in may web site, which is much biger then just a simple mail form, that I need to know the other way to.
But, if I can make any kind of form with zem, then thats great. I just sit down to work, so I’ll try it now.
Thanks a lot!
Offline
Re: More (or again) on using php in txp
You can do what you want with zem plugin, you can have up to 10 field inside it, and more with some php coding.
I think you can use it, it s better for you and safer!
Cheers
Offline
Re: More (or again) on using php in txp
I dont get it. Just been trying to put my contact form into zem plugin, and its
not that easy.
I mean, I already build my contact form using html and css, and it works just fine. Translating that into txp is a lot of work and tweaking. I used ol for my form and button replacement tehnic for submit button.
<form method=“post” action=“kontakt.php”>
<fieldset>
<ol>
<li>
<label for=“ime”>Ime: </label>
</ol>
</fieldset >
<fieldset class=“submit”>
<button id=“replacement-1” type=“submit”>Send</button>
</fieldset>
</form>
Just how am I going to put this into zem plugin? And styling? And this is nothing special, its a simple form build with ol.
It looks to me like that zem is for those who just want a contact form, fast and easy.
Last edited by AndrijaM (2007-12-24 12:42:29)
Offline
Re: More (or again) on using php in txp
So, you don’t know how to use the plugin, ZCR, and by that you blame it to be bad, only for simple contact forms. No, that’s not true at all, because it can do anysorts of things, and it also protects spam by neet steps.
Translating that into txp is a lot of work and tweaking.
No, it doesn’t. See:
<txp:zem_contact to="dest@example.com">
<fieldset>
<ol>
<li><txp:zem_contact_email label="Email" break="" /></li>
<li><txp:zem_contact_text label="ime" break="" /></li>
<li><txp:zem_contact_text label="web sait" break="" /></li>
<li><txp:zem_contact_textarea label="Poruka" break="" /><li>
<li><txp:zem_contact_submit label="Send" /></li>
</ol>
</fieldset>
</txp:zem_contact>
Read the help doc of the plugin ;)
Cheers!
Last edited by Gocom (2007-12-24 13:34:51)
Offline
Re: More (or again) on using php in txp
Thanks for helping, but I already tried that and still it is not ok.
I didnt said that ZCR is bad, but it do takes time to read through the doc and learn it.
For instance,
in my html code I have:
<li>
<label for=“ime”>Ime: </label>
<input id=“ime” name=“ime” class=“text” type=“text” />
</li>
To make that, I need to write this in zem:
<li><txp:zem_contact_text label=“ime” break=”“ /></li>
If I put on the label value “ime” then in my contact form next to the field is going to say ime, which is not correct in my language. I need to put Ime: like in the html:
<label for=“ime”>Ime: </label>
Also, label value automaticaly becomes id in input. I used that input id to for styling, my form layout depends on that id.
<li>
<label for=“ime” class=“zemText zemRequired ime”>ime</label>
<input type=“text” id=“ime” class=“zemText zemRequired” name=“ime” value=”“ maxlength=“100” />
</li>
Also, please tell me how can I, if i can add another class to the input or label, it is easier to add it to zem then to go in my css and make changes there.
So, I guess everything could be fixed, but then I need to go to my css file, make more changes, and thats more work.
Thanks again!
Last edited by AndrijaM (2007-12-24 14:14:19)
Offline
Re: More (or again) on using php in txp
Got it, its the name atribute.
Thanks!
Offline
Pages: 1