Hello everyone!
i have redirect-action to
Url: http://www.domain2.com
when i submit looks like get request:
http://www.domain2.com/field=&field1=&button=button
is there some way to get rid of field=&field1=&button=button
there are alot options to add params, but how to remove?
is there an easier solution than javascript manipulation?
A chronoform-way?
anybody some hint?
i have redirect-action to
Url: http://www.domain2.com
when i submit looks like get request:
http://www.domain2.com/field=&field1=&button=button
is there some way to get rid of field=&field1=&button=button
there are alot options to add params, but how to remove?
is there an easier solution than javascript manipulation?
A chronoform-way?
anybody some hint?
ok now with custom js:
would there be a "better chronoform" alternative?
jQuery('#input1,#Input2,#button').removeAttr( 'name' );
would there be a "better chronoform" alternative?
Hi mdma,
The Redirect action will use only the UL and parameters that you set. If you don't need them, you can leave them out. ChronoForms does not ad field or button by default.
Bob
The Redirect action will use only the UL and parameters that you set. If you don't need them, you can leave them out. ChronoForms does not ad field or button by default.
Bob
Hello Bob, You are totally right !! that came from my custom.js
i have seen the docu "get form data to php" but struggle a bit with understanding:
i need to get the form data of a datepicker(field1)
i have to explode the input Y-M-D and hand over to extra params of redirect dynamically:
day=D from field1
variable monthyear=M-Y from field1
is it realizable like this?
i have seen the docu "get form data to php" but struggle a bit with understanding:
i need to get the form data of a datepicker(field1)
i have to explode the input Y-M-D and hand over to extra params of redirect dynamically:
day=D from field1
variable monthyear=M-Y from field1
is it realizable like this?
Hi mdma,
You can use a Custom Code action before the ReDirect to split up the date. Something like this should work:
Bob
You can use a Custom Code action before the ReDirect to split up the date. Something like this should work:
<?php
$form->data['year'] = date( 'Y', strtotime($form->data['date']) );
$form->data['month_day'] = date( 'm-d', strtotime($form->data['date']) );
?>
Bob
and in extra params like this:
newparamname=year
newparamname=['year']
i ill try this thousand thanks..
newparamname=year
newparamname=['year']
i ill try this thousand thanks..
i have a php switch for custom code..
you know how to pass dynmamically the redirect-url from custom code based on language?? or should i make multiple redirects for different lang-url?
you know how to pass dynmamically the redirect-url from custom code based on language?? or should i make multiple redirects for different lang-url?
is there some variable possible to hand over from custom code like?
$form->action['http://wwwredirect-url.com']
$form->action['http://wwwredirect-url.com']
i ended up with event-action de,en,fr,it
4 different redirects
slightly overkill of configuration...
what do you think may the locales worked maybe inside redirect action url?
<?php
$lang =& JFactory::getLanguage();
$tag =& $lang->getTag();
switch ( $tag ) {
case 'de-DE':
default:
return 'de';
break;
case 'en-EN':
return 'en';
break;
case 'it-IT':
return 'it';
break;
case 'fr-FR':
return 'fr';
break;
}
?>
4 different redirects
slightly overkill of configuration...
what do you think may the locales worked maybe inside redirect action url?
Hi mdma,
What are the different URLs for the different languages?
I don't think that you can set the ReDirect action URL dynamically in CFv5. You could use an event switcher with an event for each language. Or, probably simpler you can use the Joomla! Redirection code
Bob
What are the different URLs for the different languages?
I don't think that you can set the ReDirect action URL dynamically in CFv5. You could use an event switcher with an event for each language. Or, probably simpler you can use the Joomla! Redirection code
<?php
$app = \JFactory::getApplication();
$url = . . . . // some code here to build the url
$app->redirect($url);
?>
Bob
The Problem with the URL i have to reconstruct:
http://www.domain.com/xyz/ab/name.de.html ...de
http://www.domain.com/xyz/ab/name.en-gb.html ...en
http://www.domain.com/xyz/ab/name.it.html ...it
http://www.domain.com/xyz/ab/name.fr.html ...fr
There is a problem with this code cant figure out why it doesnt work (return, switch case problem?)
http://www.domain.com/xyz/ab/name.de.html ...de
http://www.domain.com/xyz/ab/name.en-gb.html ...en
http://www.domain.com/xyz/ab/name.it.html ...it
http://www.domain.com/xyz/ab/name.fr.html ...fr
There is a problem with this code cant figure out why it doesnt work (return, switch case problem?)
<?php
$lang =& JFactory::getLanguage();
$tag =& $lang->getTag();
switch ( $tag ) {
case 'de-DE':
default:
return 'de';
break;
case 'en-EN':
return 'en';
break;
case 'it-IT':
return 'it';
break;
case 'fr-FR':
return 'fr';
break;
}
?>
Hi mdma,
I don't quite see where your code fits - this version should do a redirection for you
Bob
I don't quite see where your code fits - this version should do a redirection for you
<?php
$lang = \JFactory::getLanguage();
$tag =& $lang->getTag();
switch ( $tag ) {
case 'de-DE':
default:
$temp = 'de';
break;
case 'en-GB':
$temp = 'en-gb';
break;
case 'it-IT':
$temp = 'it';
break;
case 'fr-FR':
$temp = 'fr';
break;
}
$url = "http://www.domain.com/xyz/ab/name.{$temp}.html";
$app = \JFactory::getApplication();
$app->redirect($url);
?>
Bob
1.)Thankyou alot! I totally checked everything!
2.)The event-code for events works! i had some custom js loading, thats why my events where not working.
3.)I tested now everything. and i came up to also replace the url through locales! it works too
Now i feel like: "havent seeing trees, standing in a forrest"!😶
2.)The event-code for events works! i had some custom js loading, thats why my events where not working.
3.)I tested now everything. and i came up to also replace the url through locales! it works too
Now i feel like: "havent seeing trees, standing in a forrest"!😶
This topic is locked and no more replies can be posted.