Search

Hmm, duplicate IDs being generated is actually something I didn't notice, probably because I had only one form per page. I will look into it.

BTW: I am at the Symposium 2011, so I don't find the time right now. But I will try and do it when I am back in Munich. If I don't response, feel free to post a reminder. Anything related to Members should "just work".

I thought about the duplicate ID issue mentioned by @ixi and posted an issue on Github.

@anybody: Correct me if I am wrong. I think that IDs are only used for:

  • "mapping" an HTML label element to an input field
  • creating CSS/JavaScript "hooks"

So IDs don't have to follow a naming scheme at all. You might use any value you want (as long as it is unique). So what I think about is add the ability to override auto-generated IDs in your form, like so:

<xsl:call-template name="members:input-identity">
    <xsl:with-param name="event" select="$event"/>
    <xsl:with-param name="id" select="'some-special-id'"/>
</xsl:call-template>

which will output:

<div class="input">
    <label for="some-special-id">Username</label>
    <input type="text" id="some-special-id" name="fields[username]" />
</div>

Downside: This makes the developer responsible as soon as two or more forms are used on the same page.

But: This solution also gives the greatest degree of freedom when it comes to IDs. Additionally, auto-generation of IDs will still work as before, so the solution would be completely backwards-compatible.

What does anybody think of the proposed solution? Any feedback is welcome.

Members Forms updated to version 1.1 on 24th of October 2011.

Members forms now allows to override auto-generated IDs for input fields. Additionally, you can manually pass an ID for the input type "submit" (which has no ID attribute by default).

Members Forms updated to version 1.1.1 on 26th of October 2011

That is a bugfix release, highly recommended if you use version 1.1!

Members Forms updated to version 1.1.3 on 11th of December 2011

Thanks to @Lewis for discovering an issue related to the example code.

Thanks Michael, I think that will help others.

Curious. I just started integrating Members Forms, specifically:

<xsl:import href="../utilities/members.form-login.xsl"/>

<xsl:call-template name="members-form-login"/>

But symphony is complaining that the template can not be found:

XSLTProcessor::transformToXml(): The called template 'members-form-login' was not found.

I downloaded everything from examples to workspace/utilities, am I still missing something?

Thanks!

If the template is there (in the utilities folder), it should work.

Maybe you haven't copied the example templates to the utilities folder? The README says:

Copy at least one language file and all the members.form-... files in the examples folder to the root of your utilities folder.

Sorry! Please disregard my previous post. I accidentally copied members.config.xsl into members.form-login.xsl

I spent a good portion of this morning trying to get my custom fields in my registration form to validate like the Members fields do. I finally saw this issue, which led me to try removing the single quotes around the name of the field in the error returned by Symphony's basic Text Input field (the only kind I need for my custom fields). Removing these quote marks allowed the custom fields to validate like the Members form fields, which is great.

Do you know why the Text Field returns error with the single quotes and the Members forms don't? Is it possible to parse them out to allow custom fields to integrate easily, or to change the Text Input to not use them?

Sorry if this is the wrong place to post this, I don't believe there is a topic for built-in Symphony fields...

Edit: turns out this can be fixed by updating the members.config.xml file to include messages which use and not just ' since this commit updated all the quote marks.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details