Coder Social home page Coder Social logo

com_connect's Introduction

Textpattern CMS

Crowdin Known Vulnerabilities GitHub Sponsors

Textpattern Logo

A flexible, elegant, fast and easy-to-use content management system written in PHP. Textpattern is free and open source software.

Textpattern CMS screenshots

System requirements

Textpattern is installed to a web server with PHP and MySQL.

Ensure the server meets or exceeds the system requirements before you continue.

Download Textpattern

The current production release is version 4.8.8. It can be downloaded from the Textpattern website or GitHub in .zip and .tar.gz varieties.

If you want to use the multi-site functionality in Textpattern, get the .tar.gz archive.

textpattern.com GitHub
.zip Download Download
.tar.gz Download Download

Install Textpattern

Please see README.txt for details on installing Textpattern.

Upgrade Textpattern

Please see README.txt for details on upgrading Textpattern.

Help and Support

The Textpattern support forum is home to a friendly and helpful community of Textpattern users and experts. Textpattern also has a social network presence on Mastodon and Twitter.

Development

The development snapshot can be obtained from the Textpattern repository on GitHub.

Anticipated changes to future system requirements

As a development version approaches release, minimum and recommended system requirements are confirmed and the production release system requirements is updated accordingly.

The following table outlines anticipated forthcoming changes to system requirements. It takes into account vendor support, security considerations, overall performance and other factors. Note that minimum and/or recommended versions listed may change multiple times during the development process.

Textpattern development versions

Note that targeted versions listed may change multiple times during the development process.

We are targeting Textpattern 4.9 as the next minor release. Refer to the following table for anticipated changes to system requirements.

Minimum Recommended
PHP 5.6 vendor supported
(8.1, 8.2 or 8.3)
MySQL 5.5 vendor supported LTS
(8.0)
Apache vendor supported
(2.4)
Nginx mainline (1.25) or stable (1.26)

Contributing

Do you want to help with the development of Textpattern? Please refer to the contributing documentation for full details.

GitHub topic tags

If you use GitHub for Textpattern-related development please consider adding some of the following topic keywords to your public project repositories, so we can expand the network of discoverable resources:

Additional development tools

Various components used within Textpattern (such as the bundled themes and language translations) are maintained in standalone repositories. Textpattern has a simple development toolset built on Node.js to pull the distribution files of those repositories into the core as required.

You can install Node.js using the installer or package manager.

Install required dev tools:

npm install

You can then pull the following components from the CLI, like so:

npm run get-default-theme
npm run get-classic-admin-theme
npm run get-hive-admin-theme
npm run get-pophelp
npm run get-textpacks
npm run get-dependencies

To request a specific tag or branch:

npm run get-default-theme 4.8.8
npm run get-classic-admin-theme 4.8.8
npm run get-classic-admin-theme 4.8.x
npm run get-hive-admin-theme 4.8.x
npm run get-textpacks 4.8.x

Release tools:

Usage: npm run txp-gitdist <version> [dest-dir] (dest-dir defaults to a temporary location).

npm run txp-index
npm run txp-checksums
npm run txp-gitdist 1.2.3 ../my-dest-dir

Thank You

Thank you to our GitHub sponsors. Your continued support is greatly appreciated!

We are grateful to DigitalOcean, BrowserStack and 1Password for their kind considerations in supporting Textpattern CMS development by way of web hosting infrastructure (DigitalOcean), cross-browser testing platform (BrowserStack) and secure password management (1Password). Thank you!

This project is supported by:

Legal

Released under the GNU General Public License. See LICENSE.txt for terms and conditions.

Includes contributions licensed under the GNU Lesser General Public License. See LICENSE-LESSER.txt for terms and conditions.

Includes contributions licensed under the New BSD License. See LICENSE-BSD-3.txt for terms and conditions.

Textpattern CMS blogging illustration

com_connect's People

Contributors

bloatware avatar bloke avatar jools-r avatar keesbran avatar philwareham avatar rwetzlmayr avatar wcz-txp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

com_connect's Issues

Remove label

Hi

Another feature request is removing label on input, a lot of design are using placeholder instead of label, then it s anoying to use css to hide it

Consider adding the `aria-invalid` attribute on invalid required fields

Details in the spec here.

Basically, when the form is submitted and contains errors in required fields, ZCR already flag these fields with an error message (and an a CSS .class). Adding the aria-invalid attribute might make it easier for users of AT to find the field, particularly for complex forms.

Output would be something like:

<input class="zemText required-field warn-field" id="Name" name="Name" type="text"
 maxlength="100" form="zcr90ee6dd232899193473d48838f53e9b7" 
placeholder="Your Name" required aria-invalid="true">

Select tag - remove attribute size="0" default

If a user doesn't supply a size attribute for zem_contact_select, then the HTML output includes the attribute size="0". This is technically incorrect, as in the HTML5 spec it states it should be 1 - but it's safer to omit the size attribute altogether in this instance and let browsers use their default rendering, due to browsers not adhering property to the spec.

From MDN:

"According to the HTML5 specification, the default value for size should be 1; however, in practice, this has been found to break some web sites, and no other browser currently does that, so Mozilla have opted to continue to return 0 for the time being with Firefox."

[feature request] craft different email bodies for "to" recipient and "copysender" recipient.

Feature request: to be able to craft different email bodies for contact form recipient and “copysender” recipient.

Use case: you may want to have some hidden/secret fields on your contact form message and only include them on the email sent to the contact form recipient, while excluding them from the “copysender” recipient. Or maybe you want to add some extra message for the “copysender” recipient so to explain him why is he receiving a copy of the email or whatever.

I thought that testing for copysender value inside body_form could be a solution, but I checked the plugin source code and it seems that the $msg payload is the same for both messages.

Thanks.

"unregistered_tag while parsing form None on page contact"

apologies if this is fixed in master, i'm using the 4.5.0 release.

getting a ton of these on page load:


Tag error: <txp:zem_contact to="[email protected]"> -> Textpattern Notice: unregistered_tag while parsing form None on page contact

textpattern/lib/txplib_publish.php:467 trigger_error()
textpattern/lib/txplib_publish.php:391 processTags()
textpattern/lib/txplib_misc.php:4358 parse()
textpattern/publish.php:558 parse_page()
index.php:105 textpattern()

Tag error: <txp:zem_contact_text break="" label="Name: " /> -> Textpattern Notice: unregistered_tag while parsing form None on page contact

textpattern/lib/txplib_publish.php:467 trigger_error()
textpattern/lib/txplib_publish.php:382 processTags()
textpattern/lib/txplib_misc.php(1783) : eval()'d code:114 parse()
zem_contact()
textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func()
textpattern/lib/txplib_publish.php:468 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:391 processTags()
textpattern/lib/txplib_misc.php:4358 parse()
textpattern/publish.php:558 parse_page()
index.php:105 textpattern()

Tag error: <txp:zem_contact_email label="Email: " break="" /> -> Textpattern Notice: unregistered_tag while parsing form None on page contact

textpattern/lib/txplib_publish.php:467 trigger_error()
textpattern/lib/txplib_publish.php:382 processTags()
textpattern/lib/txplib_misc.php(1783) : eval()'d code:114 parse()
zem_contact()
textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func()
textpattern/lib/txplib_publish.php:468 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:391 processTags()
textpattern/lib/txplib_misc.php:4358 parse()
textpattern/publish.php:558 parse_page()
index.php:105 textpattern()

Tag error: <txp:zem_contact_textarea cols="30" rows="10" label="Feedback/Comment/Bribery" /> -> Textpattern Notice: unregistered_tag while parsing form None on page contact

textpattern/lib/txplib_publish.php:467 trigger_error()
textpattern/lib/txplib_publish.php:382 processTags()
textpattern/lib/txplib_misc.php(1783) : eval()'d code:114 parse()
zem_contact()
textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func()
textpattern/lib/txplib_publish.php:468 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:391 processTags()
textpattern/lib/txplib_misc.php:4358 parse()
textpattern/publish.php:558 parse_page()
index.php:105 textpattern()

Tag error: <txp:zem_contact_checkbox label="Yes, please send; I am a meat popsicle." /> -> Textpattern Notice: unregistered_tag while parsing form None on page contact

textpattern/lib/txplib_publish.php:467 trigger_error()
textpattern/lib/txplib_publish.php:382 processTags()
textpattern/lib/txplib_misc.php(1783) : eval()'d code:114 parse()
zem_contact()
textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func()
textpattern/lib/txplib_publish.php:468 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:391 processTags()
textpattern/lib/txplib_misc.php:4358 parse()
textpattern/publish.php:558 parse_page()
index.php:105 textpattern()

Tag error: <txp:zem_contact_serverinfo name="REMOTE_ADDR" label="IP number" /> -> Textpattern Notice: unregistered_tag while parsing form None on page contact

textpattern/lib/txplib_publish.php:467 trigger_error()
textpattern/lib/txplib_publish.php:382 processTags()
textpattern/lib/txplib_misc.php(1783) : eval()'d code:114 parse()
zem_contact()
textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func()
textpattern/lib/txplib_publish.php:468 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:391 processTags()
textpattern/lib/txplib_misc.php:4358 parse()
textpattern/publish.php:558 parse_page()
index.php:105 textpattern()

Tag error: <txp:zem_contact_submit label="Send" /> -> Textpattern Notice: unregistered_tag while parsing form None on page contact

textpattern/lib/txplib_publish.php:467 trigger_error()
textpattern/lib/txplib_publish.php:382 processTags()
textpattern/lib/txplib_misc.php(1783) : eval()'d code:114 parse()
zem_contact()
textpattern/vendors/Textpattern/Tag/Registry.php:83 call_user_func()
textpattern/lib/txplib_publish.php:468 Textpattern\Tag\Registry->process()
textpattern/lib/txplib_publish.php:391 processTags()
textpattern/lib/txplib_misc.php:4358 parse()
textpattern/publish.php:558 parse_page()
index.php:105 textpattern()


(didn't even bother formatting, sorry.)

using this:

<txp:zem_contact to="[email protected]">
  <txp:zem_contact_text break="" label="Name: " /><br>
  <txp:zem_contact_email label="Email: " break="" /><br>
  <txp:zem_contact_textarea cols="30" rows="10" label="Feedback/Comment/Bribery" />
  <br>
  <txp:zem_contact_checkbox label="Yes, please send; I am a meat popsicle." />
  <txp:zem_contact_serverinfo name="REMOTE_ADDR" label="IP number" />
  <txp:zem_contact_serverinfo name="REMOTE_PORT" label="SRC port" />
  <txp:zem_contact_serverinfo name="X_FORWARDED_FOR" label="X_FORWARDED" />
  <txp:zem_contact_serverinfo name="SERVER_NAME" label="VHOST" />
  <txp:zem_contact_serverinfo name="HTTP_REFERER" label="Referer" />
  <txp:zem_contact_serverinfo name="HTTP_USER_AGENT" label="UA string" />
  <txp:zem_contact_serverinfo name="HTTPS" label="HTTPS bool" />
  <txp:zem_contact_submit label="Send" />
</txp:zem_contact>

Interestingly enough, the form sends just fine (and all the fields are populated when they should be with what they should be, etc.) so it doesn't seem to be fatal, but i figured i'd pass it along.

(this is on the "4.6.x" "version" of TXP- specifically, current HEAD- 6083763540f3a1cbcc9620d5eb307ccbc8b50ece ) on nginx 1.9.10 with php-fpm, on php 7.0.3 (via Arch).

you did a GREAT job on reviving this plugin, by the way!

Better Textpack support

Please, add this first 2 lines into the English Texpack. Otherwise, the English translation is served as the current front-end language (in my case in French):

#@public
#Default language, en-us, en-gb

Validation issue with `zem_contact_select`

Given this input: <txp:zem_contact_select label="Department" options=",Marketing,Sales,Support" />

This generates the following html (given an HTML5 Doctype)

<select class="zemSelect required-field" id="Department" name="Department" form="zcr980d3c953e3927933e7094318b520118" required="">
    <option selected="selected"> </option>
    <option>Marketing</option>
    <option>Sales</option>
    <option>Support</option>
</select>

The HTML validator flags the first option as invalid:
“Element option without attribute label must not be empty.“

(No I didn’t know that either)

Note:

  1. none of the options have a label or value attribute (not required nowadays…, go figure)
  2. trying to validate the above HTML (manually generated) with one change <option selected="selected" label=""> </option> (added empty label attribute) gives the same result. But label=" " does work (contains a space).

class attribute bug

If you set the class attribute on tags to class="" you'd expect no class attribute to be added to the tags in HTML. Instead you get the empty class="" appearing in markup, which is not very desirable.

Need some logic which omits the class attribute altogether if a user states class="" on the tag.

Register tags

Txp 4.6+ requires registration for the entire tag suite. Needs adding.

[feature request] optional appending of the URL fragment after form submit

Make the appending of the URL fragment (the one that identifies & anchors to the contact form element: e.g. #zcr1234567abcdefg) to the form action attribute optional, as it may affect the functionality of the redirect option.

How does the appending of the URL fragment to the action attribute affect the redirect functionality?

After submitting the form, when the destination URL also has the contact form rendered (for example, in a site-wide contact form present in the site footer), the user gets scrolled down to the form again, instead of being presented with whatever is in the redirect URL (usually, a “thank you” message and maybe some call to actions).

I’d say that it might be safe to make them mutually exclusive: if the redirect option is used, it seems undesirable/unnecessary to have the URL fragment appended to the action attribute.

a diff with some additions to the "send article" functionality

Here is a unpolished diff of some unpolished features that I've added for the "send article" functionality, trying to shape it more into a "send page" functionality.
It can definitely be improved.

It adds two features:

  • the share_url attribute. It lets you specify the URL you want to share, instead of defaulting it to the article permalink.
  • the include_article attribute: It lets you disable the default inclusion of the article body/excerpt on the email body.

Note: I initially developed the share_url attribute as a query_string attribute, the value of the attribute to be appended to the article permalink, to make it easier to tag the URL with UTM (Google Analytics) parameters. But then, I noticed that outside of article context, the email would be sent but no URL would be included on the email body. Then, mostly as a quick&dirty patch, I repurposed the query_string attribute as a share_url attribute that could be feed with whichever value you need (for example, from a txp:variable).

To-do:

  • on non-article context, the share_url could default to the current URL.

Feel free to rework it or to ditch it, whatever floats your boat. :)

--- zem_contact_reborn-4.5.0.0.orig 2017-01-26 18:30:07.000000000 -0300
+++ zem_contact_reborn-4.5.0.0.new 2017-01-26 18:30:07.000000000 -0300
@@ -59,11 +59,13 @@
         'subject'          => null,
         'subject_form'     => '',
         'to'               => '',
         'to_form'          => '',
         'thanks'           => null,
-        'thanks_form'      => ''
+        'thanks_form'      => '',
+        'share_url'      => '',
+        'include_article'      => 1
     ), $atts));
 
     if (!empty($lang)) {
         $strings = zem_contact_load_lang($lang);
         $textarray = array_merge($textarray, $strings);
@@ -234,22 +236,24 @@
         }
 
         if ($send_article) {
             global $thisarticle;
 
-            $subject = str_replace('&#38;', '&', $thisarticle['title']);
-            $msg[] = permlinkurl($thisarticle);
-            $msg[] = $subject;
+            // $subject = str_replace('&#38;', '&', $thisarticle['title']);
+            $msg[] = $share_url ? $share_url : permlinkurl($thisarticle);
+            // $msg[] = $subject;
             $s_ar = array('&#8216;', '&#8217;', '&#8220;', '&#8221;', '&#8217;', '&#8242;', '&#8243;', '&#8230;', '&#8211;', '&#8212;', '&#215;', '&#8482;', '&#174;', '&#169;', '&lt;', '&gt;', '&quot;', '&amp;', '&#38;', "\t", '<p');
 
             if ($override_email_charset) {
                 $r_ar = array("'", "'", '"', '"', "'", "'", '"', '...', '-', '--', 'x', '[tm]', '(r)', '(c)', '<', '>', '"', '&', '&', ' ', "\n<p");
             } else {
                 $r_ar = array('‘', '’', '“', '”', '’', '?', '?', '…', '–', '—', '×', '™', '®', '©', '<', '>', '"', '&', '&', ' ', "\n<p");
             }
 
-            $msg[] = trim(strip_tags(str_replace($s_ar, $r_ar, (trim(strip_tags($thisarticle['excerpt'])) ? $thisarticle['excerpt'] : $thisarticle['body']))));
+            if ($include_article) {
+                $msg[] = trim(strip_tags(str_replace($s_ar, $r_ar, (trim(strip_tags($thisarticle['excerpt'])) ? $thisarticle['excerpt'] : $thisarticle['body']))));
+            }
 
             if (empty($zem_contact_recipient)) {
                 return gTxt('zem_contact_field_missing', array('{field}' => gTxt('zem_contact_recipient')));
             } else {
                 $to = $zem_contact_recipient;

Min attribute and min length

The attribute min need some improvements:

When min stated on text inputs type text, email, search, password, tel, or url and on textareas - min should produce a minlength attribute - currently doesn't do anything.

Input alignment

Textpattern website with zemContact plugin

All the inputs have the labels on a separate line apparantly by default. Nothing in CSS.

I want to change this in CSS. So for class zemRadio I tell it to put the label and the radio button on the same line.

Any ideas?

Sent messages are blocked by anti-spam

For some reasons all messages sent by com_connect are blocked by anti-spam of sender email server (I presume).
Tech support told me that the error is:

spam_content_r6_script_reject, in other words, some content of message body is detected as spam and refused. Probably is the name of the script used for sending message. Try to modify the script to make it more anonymous.

Some suggestions?

Validation issue

E.g. fill out a form, and (what be can happen) forget one required field. Submit the form. The form would be validated and return the required fields (on best practices) highlighted. Now look on the other fields you filled out before, they are all validated as OK, but they are now empty. So, the form forgets the filled fields. Further, you know the occurring unintended side effects…

TXP: 4.5.7
ZCR: 4.5.0.0

Inserting the output of a com_connect_select in in the subject line of a mail message fails

forum thread: https://forum.textpattern.com/viewtopic.php?pid=331182#p331182

Textpattern 4.8.7 / PHP 8.0.2, latest plugin version (4.7.0+)

The key is trying to fetch and then outputting the result of a <com_connect_select /> via some <txp:php /> snippet (doesn't matter constructing the subject line of the or inserting it inside the body of a mail message).

<pre dir="auto">Tag error: <b><txp:php>     global $com_connect_form;     echo 'Contact [sitename] - ' . $com_connect_form['Subject']; </txp:php></b> -> <b> Warning: Array to string conversion while parsing form <strong>contact-subject</strong> on page <strong>default</strong></b></pre>
Contact [sitename] - Array

Probable consequence of this: 3cf17ca

(but don’t trust my failing memory too much!)

Label not being suppressed with label="" on txp 4.80dev

With the current 4.80dev version, I get an empty label when I use label="" name="my-form-field" to suppress its display but keep the form name.

Interestingly, adding the attribute label_position="" works to suppress it entirely.

BTW: my main motivation for suppressing the label field is the ability to give it a different class to the field. A labelclass / label_class attribute might be useful here…

Composer install

It would be nice to have a composer.json file and register the plugin with Packagist.

Also IMHO the name 'zem_contact_reborn'... really? This means nothing and the plugin is so far from the original version a new, more sensible, name would be better - along with a proper semver version number. Just credit zem (and all other contributors) somewhere in the README and code.

Checkboxes and radios - option to have label before

It would be nice to have the option of rendering the label tag before the checkbox/radio, as an alternative to rendering label after. There are situations where this can be useful. Would need a new attribute.

I guess that new attribute could also be allowed on other input/select/textarea tags too, for more flexibility in how an author wants to display their forms (although with the reverse default setting).

zem_contact_option

In zem_contact_option the label/thing will always be overwritten by value. I think it's not the indended behaviour.

Support checkbox groups

SImilar to the way radio buttons are 'grouped' using a single key, allow checkboxes to behave likewise. This involves adding [] to the name of any 'grouped' boxes so the values are passed as a list.

Remove the useless contents tree from the plugin help file

The Textpattern auto-TOC feature recently introduced in the plugin help view makes the Contents part of the README file useless. While this part could be deleted from an embedded help file and kept into the one used for this repo, I could also introduce an id or class which could be use to hide some contents when rendering. What do you think?

fieldset and legend on output even when label attr set to empty value

Plugin FAQ section states:

How do I remove the legend and fieldset surrounding the contact form?
Set the label attribute to an empty value (label="") in the zem_contact tag.

And also, help for <txp:zem_contact /> tag states:

label="text"
Label for the contact form. If set to an empty string, display of the fieldset and legend tags will be suppressed. Default is Contact.

But logic seems flawed:

    // Set defaults, in the local language if necessary.
    if ($label === '') {
        $label = gTxt('zem_contact_contact');
    }

as setting the attribute to an empty value, it always gets populated by some string.

I've tried setting the attribute to a blank space (label=" ") but the fieldset and legend tags (even if the latter is empty) are part of the output.

Language inclusion

Hi,

Here goes some short contribution.

#@language pt-br
zem_contact_checkbox => Checkbox
zem_contact_contact => Contato
zem_contact_email => Email
zem_contact_email_subject => {site} > Contato
zem_contact_email_thanks => Obrigado, sua mensagem foi enviada.
zem_contact_field_missing => Faltou preencher o campo requerido &#8220;<strong>{field}</strong>&#8221;.
zem_contact_format_warning => O valor {value} em &#8220;<strong>{field}</strong>&#8221; não está formato esperado.
zem_contact_form_expired => O formulário expirou, por favor tente novamente.
zem_contact_form_used => O formulário já foi enviado, por favor preencha o formulário novamente.
zem_contact_general_inquiry => Assuntos gerais
zem_contact_invalid_email => &#8220;<strong>{email}</strong>&#8221; não é um endereço de email válido.
zem_contact_invalid_host => &#8220;<strong>{host}</strong>&#8221; não é um domínio de email válido.
zem_contact_invalid_utf8 => &#8220;<strong>{field}</strong>&#8221; contém caracteres UTF-8 inválidos.
zem_contact_invalid_value => Valor incorreto para &#8220;<strong>{field}</strong>&#8221;, &#8220;<strong>{value}</strong>&#8221; Não é uma das opções disponíveis.
zem_contact_mail_sorry => Desculpe, não foi possível enviar o email.
zem_contact_maxval_warning => &#8220;<strong>{field}</strong>&#8221; não pode exceder {value}.
zem_contact_max_warning => &#8220;<strong>{field}</strong>&#8221; não pode conter mais que {value} caracteres.
zem_contact_message => Mensagem
zem_contact_minval_warning => &#8220;<strong>{field}</strong>&#8221; deve ter ao menos {value}.
zem_contact_min_warning => &#8220;<strong>{field}</strong>&#8221; deve conter ao menos {value} caracteres.
zem_contact_name => Nome
zem_contact_option => Opção
zem_contact_pattern_warning => &#8220;<strong>{field}</strong>&#8221; não se encaixa no formato {value}.
zem_contact_radio => Rádio
zem_contact_recipient => Destinatário
zem_contact_refresh => Clique neste link caso a página não se atualize automaticamente.
zem_contact_secret => Secreto
zem_contact_send => Enviar
zem_contact_send_article => Enviar artigo
zem_contact_spam => Não aceitamos SPAM, obrigado!
zem_contact_text => Texto
zem_contact_to_missing => &#8220;<strong>To</strong>&#8221; falta o endereço de email.

HTML5 form input type: date validation fails

When setup a form with the HTML5 input type="date" and you are on an iDevice with native datepicker, the date won’t be validated. After submit ZCR says »Required field missing«, even though the date is in there. This is NOT Txp’s prefs (posted / archive dates) related.

TXP: 4.5.7
ZCR: 4.5.0.0

HTML5 form input type: date validation fails

When setup a form with the HTML5 input type="date" and you are e.g. on iPhone with native datepicker, the date won’t be validated. After submit ZCR says »Required field missing«, even though the date is in there. This is NOT Txp’s prefs (posted / archive dates) related.

TXP: 4.5.7
ZCR: 4.5.0.0

Remove unused classes completely if desired

An author should be able to remove classes from elements if desired (apart from ones such as zemRequired which are necessary).

Consider this tag code:

<txp:zem_contact_text class="" name="company" size="32" label="Company" required="0" />

Which correctly renders this code:

<label for="company">Company</label><br>
<input id="company" name="company" type="text" size="32" maxlength="100">

Now this tag code (with the field set to required):

<txp:zem_contact_text class="" name="company" size="32" label="Company" required="1" />

Which incorrectly renders this HTML code:

<label for="company" class="zemRequired company">Company</label><br>
<input class="zemRequired" id="company" name="company" type="text" size="32" maxlength="100">

An extra class has been added, that we don't want (the company class). The author wanted this really:

<label for="company" class="zemRequired">Company</label><br>
<input class="zemRequired" id="company" name="company" type="text" size="32" maxlength="100">

In the interest of backwards compatibilty, I don't mind that extra class being there as a default - but if an author stipulates class="" then it should be removed for them.

Fields without labels don't show up in email

Use name for fields and set label="" when the plugin has been patched and the email that is sent arrives without label headings, e.g.:

 : some-email
 : some field content
 : an option value

instead of

Email : some-email
Message : some field content
Favourite-fish : an option value

Might be 4.7.0-specific.

$label in zem_contact overwritten

The label of the $atts array in zem_contact will be overwritten in foreach loop at line 491. Resulting in disrespecting an empty label tag. So when using 'zemcontact.fail' the fieldset element will always be displayed.

Add disabled to Option

Hi is it possible to add disabel to option so we can have

<option disabled>This</option>

Thanks.

Support multiple select

Although 'multiple' is a valid boolean attribute accepted by the plugin, it's not yet wired up.

Add support for 'multiple' in com_connect_select so it can add [] to the name/label.

POSTed 0 value

Sometimes a 0 is submitted as input value. But L286 will prevent sending it in mail. So it would be better not to check on falsy

if (!trim($zem_contact_values[$name])) continue;

but more likely on existence:

if (!isset(trim($zem_contact_values[$name]))) continue;

help file: spurious literal `br` after attributes

Open the Help file -> Tags.
For any given tags list, look at the attributes:
Pattern: attribute-name="value"<br />explanation

Expected: render a line-break or nothing.

The text on the GitHub page displays the linebreak correctly. I suppose there is a disconnect somewhere between the server used Markdown and the Textpattern used Textile.

(version 4.7.0)

comconnect-help

Some aria attributes needed

Could you please add some aria attributes for the checkbox tag?
For Ay11 accessibility purpose these attributes are required (while their values will be managed in javascript depending on states):

function com_connect_checkbox($atts)
{
global $com_connect_error, $com_connect_submit, $com_connect_flags;

extract(com_connect_lAtts(array(
    'aria_checked'   => '',
    'aria_invalid'   => '',
    ...

Labels are printed twice (4.7.0dev)

With the latest beta of the plugin and running recent Textpattern 4.7.0dev I'm getting duplicated labels for any tags that contain the label="" attribute, see screen grab.

form-grab

Beta of latest version

If there are any blockers to a new beta release, let's lost them here. Otherwise I'm keen to see a beta of the revamped version for user testing and feedback.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.