We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I hope you know what i mean. If not, i can give more details.
The text was updated successfully, but these errors were encountered:
I'm not sure. Can you explain it a bit more by an example?
Sorry, something went wrong.
Create two hidden TVs, one named 'hidden_value_1' with a value of '1', the other named 'hidden_value_2' with a value of '2'
Form Tabs JSON:
[{ "formname":"FormOne" ,"formtabs": [{ "caption":"FormOne" ,"fields": [{ "field":"hidden_value" ,"inputTV":"hidden_value_1" }] }] },{ "formname":"FormTwo" ,"formtabs": [{ "caption":"FormTwo" ,"fields": [{ "field":"hidden_value" ,"inputTV":"hidden_value_1" }] }] }]
Now, if i use 'FormTwo' to create an item, the value of 'hidden_value' is still '1', not '2'.
for this scenario you can add a new TV-type and use this for your hidden inputTv. I named mine 'hidden_fixvalue'
hidden_fixvalue.php:
<?php /** * @package modx * @subpackage processors.element.tv.renders.mgr.input */ $this->xpdo->lexicon->load('tv_widget'); return $this->xpdo->smarty->fetch('element/tv/renders/input/hidden_fixvalue.tpl');
hidden_fixvalue.tpl:
<input id="tv{$tv->id}" name="tv{$tv->id}" type="hidden" value="{$tv->get('default_text')|escape}"" />
this will allways use the default-value of the TV, not the one which was sended with the request, what the default hidden-field does.
No branches or pull requests
I hope you know what i mean. If not, i can give more details.
The text was updated successfully, but these errors were encountered: