Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 Today 13:28:18
- Adams
- Plugin Author
- Registered: 2024-08-30
- Posts: 62
Page without section
Hello,
I have section with a page assigned to it, and the page has
<form action=“save_info” method=“post”>
Right now, I have to have a section called save_info and page assigned to it.
I can call the section itself to pass all posts, but the page too and the code also too long.
Q: Is there a way to have a page without section or a procedure, function like page to called and passed info?
Or there is another way to do that?
Thank you
Online
Re: Page without section
You can have pageless sections (to hide content from URL) but not the other way around.
For direct access to forms from the URL, you can use ?f=your_form_name. Then in that form you could grab other URL/POST data, sanitize it and use it.
It’s technically designed to allow output of content in varying content-types but I don’t think there’s anything to stop you using it for write access, as long as you’re careful. I think you’ll need to go to Advanced Prefs and set up a media type for it to work. It’s been a while since I’ve used this.
Can’t recall if you need to specify the theme too, but I think not. It will use the current theme in force for whichever section the ?f= appears.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#3 Today 18:47:37
- Adams
- Plugin Author
- Registered: 2024-08-30
- Posts: 62
Re: Page without section
Thank you,
I created a form called save_info and has basic HTML tags.
and when I go to :
http://localhost/?f=save_info
also tried to call it from another page, the form below just test example not the actual page that I have, which has tens inputs
<form action=”?f=save_info” method=“post”> <label for=“name”>Name:</label> <input type=“text” id=“name” name=“user_name”>
<label for=“email”>Email:</label> <input type=“email” id=“email” name=“user_email”> <input type=“submit” value=“Submit”> </form>both ways nothing shows, just empty page, no error .
and idea what I need to make it work ?
Thank you
Last edited by Adams (Today 18:49:09)
Online
Pages: 1