CP form: dynamic subject possible?

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: CP form: dynamic subject possible?

Post by Jensensen »

[x]
Last edited by Jensensen on Sat 20. Sep 2008, 02:40, edited 3 times in total.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Re: CP form: dynamic subject possible?

Post by juergen »

claus wrote: And if I don't have a field like this - it is still working as per default:!: :D
Thats why this->me told you to use a seperated script ;)
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: CP form: dynamic subject possible?

Post by Jensensen »

[x]
Last edited by Jensensen on Sat 20. Sep 2008, 02:39, edited 3 times in total.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: CP form: dynamic subject possible?

Post by update »

I hope that a feature (as little as powerful) like this will make it's way into the main distribution some day :wink: .
Thanks again to you both, Jürgen and Jensensen, for discussing this and getting it to work :D
@Jensensen: I did it with a hidden field because radios simply don't show up within the subject select box (at least not for me), so I thought i would be a nice idea to get it working and tried the hidden field :oops:

EDIT: Too late :oops:
Will try your suggestion, Jensensen - but by now can't see the difference: using the MyEmailSubject for the radios when there is no pull down menu should work identically, or not? Hmmm....
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: CP form: dynamic subject possible?

Post by Jensensen »

[x]
Last edited by Jensensen on Sat 20. Sep 2008, 02:39, edited 1 time in total.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: CP form: dynamic subject possible?

Post by update »

Does the radio button show up in a standard form (without custom template) within thesubject select box? This form I did just plain standard, perhaps I've misunderstood you (you were probably talking about a form with a template?) In this case I didn't use a template, just a plain standard form...
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: CP form: dynamic subject possible?

Post by Jensensen »

[x]
Last edited by Jensensen on Fri 19. Sep 2008, 21:08, edited 1 time in total.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: CP form: dynamic subject possible?

Post by update »

but all checkboxes, radios, labels.... are always there [coded]
Yes, they are there - within the code. But I mean the field at top of the form generator where you can select which field should serve as a subject field. And this seems to be unable to handle radios (the option radios as subject doesn't show up)
Thus your code addition plus the hidden field --> then it shows up (in this box) :wink:
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: CP form: dynamic subject possible?

Post by Jensensen »

My suggestion:
[x]
Last edited by Jensensen on Sat 20. Sep 2008, 02:41, edited 1 time in total.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: CP form: dynamic subject possible?

Post by Jensensen »

[x]
Last edited by Jensensen on Fri 19. Sep 2008, 20:51, edited 1 time in total.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: CP form: dynamic subject possible?

Post by update »

[claus and forms - a story by itself]... :wink:
:oops: :lol: :lol:
I'm German you know :wink:
And almost all Germans really are fallen in love with forms (they use to be born with some in hand to fill them in as soon as possible - well at first their parents do that for them, a lot of forms, really :lol: )
But thank you for diving into this so deeply!
Things are becoming quite clear now, and the little addition for the core code should be implemented (somehow, by OG, perhaps... ;) )

So what do I have now:
  • a changed source code
    the possibility to get a custom subject line either via a select box or a radio set by using the var
    the default possibility
This is really very great - perhaps it helps some others too (shouldn't be my private joy only ;) )
Many thanks again :D
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
Oliver Georgi
Site Admin
Posts: 9917
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: CP form: dynamic subject possible?

Post by Oliver Georgi »

Yes, dynamic subject is possible by default!

Sorry again - think twice before "hacking" the core code for functionality still available using built-in functions.

To get a subject based on submitters input you can choose a field inside the content part. This is part one.

To get a processed subject based on input you can use a hidden field with some replacement tag in combination with frontend_render.

Or inject the $_POST var using frontend_init.


I have checked, yes seems there is a bug for select menus.


But stop hacking!!!
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: CP form: dynamic subject possible?

Post by update »

I have checked, yes seems there is a bug for select menus.
And radios, checkboxes too - eventually?
So this will be fixed! Good news :) :)
But stop hacking!!!
Then promised... ;)
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
silbro
Posts: 4
Joined: Mon 21. Jan 2008, 16:22
Location: Switzerland | Zürich

Re: CP form: dynamic subject possible?

Post by silbro »

Hello!

I'm new to the script and new to the forum :) I just noticed that phpwcms is quiet uhm how should I say wide ( You can do a lot of things with it ) My problem is that I want the user to be able to select the e-mail address he wants to send the form to. I guess this falls into the same category. After reading the first few lines of code I started drifting off in my dream world :roll:, must be the time :mrgreen: (soon I can go home ;) ) I understand what you guys did more or less just not in the detail (haven't looked at your code thoroughly enough). My question though is the following:

Wouldn't it be easier creating a form for special needs extern and then import it ? As far as I know it should be possible to import .php files without a problem, am I right :) :?: I just think it might not be the best idea to go hack in the original code because of overview and export reasons that might occurr later on.


Looks like I'll be using this forum more too in the future because the company I work at uses this script and since I got a bit of webpage creation experience they'll let me do more stuff with this script :)
User avatar
Oliver Georgi
Site Admin
Posts: 9917
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: CP form: dynamic subject possible?

Post by Oliver Georgi »

There are multiple ways to select the email address the form should be sent to. So this is really possible by default, including multiple recipients, send to friend or whatever.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply