Last active
March 2, 2020 16:01
-
-
Save slischka/0e6893da361c7aaaa12358878a178233 to your computer and use it in GitHub Desktop.
Customizace fapi formulářů
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.jQueryFapi('[name="notes"]') | |
.closest('tr') | |
.after( | |
'<tr><th></th><td class="form_container_description">' + | |
'Tady dejte vlastní text.' + | |
'</td></tr>' | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var allowedStateCodes = ['DE', 'AT', 'CZ', 'SK']; | |
window.jQueryFapi('#frm-state option').each(function () { | |
var item = window.jQueryFapi(this); | |
if (allowedStateCodes.indexOf(item.val()) === -1) { | |
item.remove(); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $table = window.jQueryFapi('.fapi-form-personal-information').find('table'); | |
$table.find("[name='ic_dph']").closest('tr').prependTo($table); | |
$table.find("[name='dic']").closest('tr').prependTo($table); | |
$table.find("[name='ic']").closest('tr').prependTo($table); | |
$table.find(".form_container_description").closest('tr').prependTo($table); | |
$table.find("[name='company']").closest('tr').prependTo($table); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $terms = window.jQueryFapi('.fapi-terms'); | |
var $a = $terms.find('a'); | |
$terms.text('Můj nový text před odkazem'); | |
$a.text('Můj nový text odkazu'); | |
$terms.append(' ').append($a).append('.'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment