Advancedform_XH
Moderator: Tata
Re: Advancedform_XH
Hi Christoph
Just made a new form using latest beta but all my fields are filled with:
ÂÂÂÂÂ
Any reason?
b
Just made a new form using latest beta but all my fields are filled with:
ÂÂÂÂÂ
Any reason?
b
Re: Advancedform_XH
Hi b,
To avoid misunderstandings: you've created the form in the form editor and saved it. Everything's ok so far. Now you've called advancedform(...) on a page, you switched to view mode, and got this result?
Christoph
To avoid misunderstandings: you've created the form in the form editor and saved it. Everything's ok so far. Now you've called advancedform(...) on a page, you switched to view mode, and got this result?
Christoph
Christoph M. Becker – Plugins for CMSimple_XH
Re: Advancedform_XH
Hi b,
that's really strange. When the form is first shown, all fields should be empty, except those for which a default is defined in the property editor of the field.
But one thing's sure: there's somewhere an encoding mismatch (Latin-1 vs. UTF-8 or so).
Could you please export the form definition, and post it here, or send it to me by PM?
Christoph
that's really strange. When the form is first shown, all fields should be empty, except those for which a default is defined in the property editor of the field.
But one thing's sure: there's somewhere an encoding mismatch (Latin-1 vs. UTF-8 or so).
Could you please export the form definition, and post it here, or send it to me by PM?
Christoph
Christoph M. Becker – Plugins for CMSimple_XH
Re: Advancedform_XH
Think I have found the problem. The file form.dat seems to have been corrupted. Re-uploaded file from the zip and recreated the form and it is now ok.
If it goes again I send you the form defintion
thanks
b
EDIT : added new fields and its gone again!!!. I'll PM you with the defintion
b
If it goes again I send you the form defintion
thanks
b
EDIT : added new fields and its gone again!!!. I'll PM you with the defintion
b
Re: Advancedform_XH
Christoph
Is there a way to go to a different Thank You page depending on how a RadioButton or checkbox has been selected?
B
Is there a way to go to a different Thank You page depending on how a RadioButton or checkbox has been selected?
B
Re: Advancedform_XH
Hi b,
that seems to be a good idea. And I was just going to answer: yes, that could easily done! But then I realized the real problem. How could this be defined in the form editor? Should I introduce another field type? Should the default "Thanks page" be kept as a fallback, if this field type isn't defined? Should the user be forced to enter a "Thanks page" for all possible values of the radio, or should there be the default of the general form's "Thanks page"?
As I've found out by experimenting, all of this could be done. But what's really needed? Could you please give an example how you would use this feature. That would make it easier for me to implement it reasonably.
Christoph
that seems to be a good idea. And I was just going to answer: yes, that could easily done! But then I realized the real problem. How could this be defined in the form editor? Should I introduce another field type? Should the default "Thanks page" be kept as a fallback, if this field type isn't defined? Should the user be forced to enter a "Thanks page" for all possible values of the radio, or should there be the default of the general form's "Thanks page"?
As I've found out by experimenting, all of this could be done. But what's really needed? Could you please give an example how you would use this feature. That would make it easier for me to implement it reasonably.
Christoph
Christoph M. Becker – Plugins for CMSimple_XH
Re: Advancedform_XH
Hi Christoph
On the RadioButton/CheckBox parameters have an extra box where you can insert an optional different Thank you page if the button is True. If the box is empty it would go to a default Thank you page.
I intend to use a feature like this so that a Thank you page could be personalised depending on what was filled in on the form. I intend to have a Buy Now PayPal button on the Thank You page which would go off to a different preset Paypal page depending on what was selected.
B.
On the RadioButton/CheckBox parameters have an extra box where you can insert an optional different Thank you page if the button is True. If the box is empty it would go to a default Thank you page.
I intend to use a feature like this so that a Thank you page could be personalised depending on what was filled in on the form. I intend to have a Buy Now PayPal button on the Thank You page which would go off to a different preset Paypal page depending on what was selected.
B.
Re: Advancedform_XH
Hi B.,
That would require the user to write some PHP, but it might not be too hard, to adapt this code. But it will even allow:
with some script code for the Thanks_page that will insert the value of the query parameter name.
Would that be enough for your needs?
Christoph
Ah, yes. Indeed that should be possible: a personalised Thanks page! This could even be used to present a page: "Dear sir..."/"Dear madame...". But wait -- what if the user wants to see: "Dear Mr. Becker..." That wouldn't be possible. As I want to keep Advancedform_XH as simple and general as possible, I'm thinking of introducing another hook, something in the line:bca wrote:I intend to use a feature like this so that a Thank you page could be personalised depending on what was filled in on the form
Code: Select all
advancedform_custom_thanks_page($form_name, $fields) {
switch ($fields['gender']) {
case 'male':
return 'Thank_you:Mister';
break;
case 'female':
return 'Thank_you:Madame';
break;
default:
return void; // redirects to the default Thanks page
}
Code: Select all
advancedform_custom_thanks_page($form_name, $fields) {
return 'Thank_you&name='.$fields['name'];
}
Would that be enough for your needs?
Christoph
Christoph M. Becker – Plugins for CMSimple_XH
Re: Advancedform_XH
Maybe personalise wasnt quite the right word although that would be nice.
I am more looking for going to a different page depending on the selection of a radiobutton/checkbox.
eg If radiobutton1=true go to paymentpage1 OR if radiobutton2=true goto paymentpage2 else go to default Thank you page.
or the paymentpage could be a more information page only available to people who have filled in the form.
Although a "Thank you John" page would be nice its not really what i had in mind
B
I am more looking for going to a different page depending on the selection of a radiobutton/checkbox.
eg If radiobutton1=true go to paymentpage1 OR if radiobutton2=true goto paymentpage2 else go to default Thank you page.
or the paymentpage could be a more information page only available to people who have filled in the form.
Although a "Thank you John" page would be nice its not really what i had in mind
B