Next: Lists, Previous: Sections, Up: Rendered pages [Contents][Index]
Note: Even though it works well, it’s possible that WwE might not parse and send all data correctly in this developmental stage.
Form fields are displayed in a face that puts a box around the text by default.
A marker is inserted showing where a form starts and whether it uses a GET or POST method. See ‘wwe-render-show-form-method-button’.
To edit a non-textarea form field press ‘RET’ with point on a form field button or ‘mouse-2’. Depending on the type of field, a different prompt appears. To cancel, press ‘C-g’ - the value won’t be changed.
Press ‘RET’ or ‘mouse-2’ on a SUBMIT button or press ‘C-c C-c’ (‘wwe-submit-form-at-point’) on any form button to submit the form. When you use ‘C-c C-c’ on a button that’s not a submit button and there is more than one submit button for the current form, a prompt with the available choices pops up and you can choose the correct submit option.
Type ‘f r’ (‘wwe-reset-form-at-point’) when point is on any form button to reset its form.
Submitting forms reuses the buffer by default, because
‘global-wwe-reuse-buffer-mode’ is enabled by default. Depending on how
buffers are reused or not reused, submitting forms follows these
modes. Set ‘wwe-forms-reuse-buffer’ to t
to change the behavior to
always reuse buffers when submitting forms.
Press ‘TAB’ (‘wwe-next-link’) or ‘<backtab>’ (‘wwe-previous-link’) to jump to the next or previous form field or link button. Cycling starts again when you reach the end or beginning of the buffer.
Sometimes form fields are disabled. You can’t navigate to these with ‘TAB’, and ‘RET’ doesn’t work. ‘C-c C-c’ to submit the form does work, though.
To see the form structure including all form fields in the help-echo area, press ‘o f’ (‘wwe-show-form’) - note that password fields are shown in clear text. Press ‘o l’ to see the form’s action URL.
Here are the various form field types:
The type of text field is shown in uppercase letters at the beginning of text form fields: TEXT, EMAIL, SEARCH, etc followed by a possible default value. If there’s a maximum length allowed, such as 50, it will be indicated as "[max 50]" after the field type name.
When you press ‘RET’ on a text form field WwE prompts you to enter a value for it. If there is a value set, that value is shown. Use a prefix argument like ‘C-u RET’ or ‘C-u mouse-2’ to get a prompt with no current value shown. Type to enter its text. Press ‘RET’ to set the value and display it in the form field on the page.
Type ‘f :’ (‘wwe-forms-edit-text-eval’) to evaluate emacs-lisp code at the prompt (like ‘M-:’, ‘eval-expression’) and set that value to form text field. You need to enable this function.
Pressing these buttons toggles their value. Pressing a checkbox turns it on or off. Toggling a radio button turns the selected button on and all other buttons that belong to it (with the same name argument) off. If the button you pressed is already on, a message appears saying so and nothing else happens.
An unchecked radio button looks like "( )" and a checked button looks like "(*)". An unchecked checkbox button looks like "[ ]" and a checked one looks like "[x]". See ‘wwe-forms-checkbox’ and ‘wwe-forms-radio’ to change them. The customizable face ‘wwe-form-checked’ makes it easy to tell when buttons are checked.
‘M-x wwe-forms-checkbox-check-all’ allows you to check all checkboxes with the same name in the form at point. Type a prefix argument like ‘C-u’ before calling it to uncheck all checkboxes.
Select form fields begin with SELECT followed by the selected option’s value.
When you press ‘RET’ you get a choose widget. Choose one of the options by completion or click ‘mouse-1’ if there are many options. When you click ‘mouse-2’ a menu pops up to choose from.
At present you need to press the select button multiple times to select or deselect more than one option.
Input the password after pressing ‘RET’ on a PASSWORD form field. Dots are shown at the prompt instead of the characters that are typed. Asterisks are then displayed in the form field.
Press ‘RET’ at the prompt without typing anything to leave the current value.
Press ‘RET’ on a FILE form field to choose a file in the mini-buffer area using ‘read-file’ filename completion. Click ‘mouse-2’ on the field to open a GUI file chooser.
Only one filename per file field is supported at this time.
Press ‘RET’ or ‘mouse-2’ on a TEXTAREA form field to edit its contents in a separate buffer (type a prefix argument like ‘C-u RET’ or ‘C-u mouse-2’ to get an empty textarea buffer). There you can use all the advantages of Emacs’ text editing in ‘wwe-forms-textarea-mode’ major mode. When you’re finished, type ‘C-c C-c’ (‘wwe-forms-textarea-done’) to set the field’s value. Type ‘C-c C-k’ (‘kill-this-buffer’) or kill the buffer to cancel.
The hook ‘wwe-forms-textarea-edit-hook’ is run after textarea-edit buffers are set up. You can check ‘wwe-forms-textarea-parent-url’ to set minor modes and other settings depending on the page’s URL. Another variable that’s available to you is ‘wwe-forms-textarea-parent-buffer’. Using ‘with-current-buffer’ you have access to all the page buffer’s variables.
After you’re done editing and you type ‘C-c C-c’, ‘wwe-forms-textarea-done-hook’ is run.
Next: Lists, Previous: Sections, Up: Rendered pages [Contents][Index]