function shorten_save_js in Shorten URLs 8
Same name and namespace in other branches
- 8.2 shorten.module \shorten_save_js()
- 6 shorten.module \shorten_save_js()
- 7.2 shorten.module \shorten_save_js()
- 7 shorten.module \shorten_save_js()
JS callback for submitting the Shorten form.
1 string reference to 'shorten_save_js'
- ShortenShortenForm::buildForm in src/
Form/ ShortenShortenForm.php - Form constructor.
File
- ./
shorten.module, line 396 - Shortens URLs via external services.
Code
function shorten_save_js(array &$form, $form_state) {
$storage =& $form_state
->getStorage();
$step = $storage['step'];
$new_form = array();
$new_form['opendiv'] = $form['opendiv'];
$new_form['shortened_url_' . $step] = $form['shortened_url_' . $step];
$new_form['url_' . $step] = $form['url_' . $step];
$new_form['closediv'] = $form['closediv'];
return $new_form;
}