Block ID on Submit or Register Button?

Permalink
Can you manually assign a block ID for the Register Button on the user registration page?

If so, can someone guide me in the right direction?

 
Remo replied on at Permalink Reply
Remo
In theory you could do something like that but I think that's a pretty bad idea. The block ID is an autoincrement column which gets assigned when you add a new block. Overriding this value could cause a number of issues.

What's the reason why you're trying to assign the block ID manually? Maybe there's another approach to solve your problem..
biz0087 replied on at Permalink Reply
Hey Remo,

I've built a custom registration page from scratch that prompts "Missing Field" or "please check a box" when the user has not filled out required fields. Some fields require x amount of characters such as a phone number or ZIP Code.

Therefore, I need to be able to validate with the register button in c5 prior to the user submitting their registration.

Also I understand that additional text fields and check boxes can be created as Attributes in c5. Can I change the IDs for these elements to match the IDs that I used for my custom registration?
Remo replied on at Permalink Reply
Remo
I'm sorry but I still don't see the connection between a custom registration page and the block ID. A registration page is built as a single page but doesn't work with blocks.

And yes, you can use attributes to build this but the ID's have to stay the way they are. The akID is an autoincrement column as well and needed for internal processing.
mnakalay replied on at Permalink Reply
mnakalay
Hello,
From what you describe, I understand you are trying to do client side form validation, aka validation before submission.
For that you need some javascript and have probaboy no use for block id . There are many javascript form vaidation plugins that you could use.

Concerning form elements as checkbox, you need to go to users atttibutes in your dashboard, add attributes and check the boxes that make them required in registration forms. Of course they will only show in your custome registration form if you wrte it correctly. I suggest you follow the original registration form to see how to include users attribute.

Good luck
biz0087 replied on at Permalink Reply
Mnakalay,

Is there a specific JavaScript plugin you highly recommend using?

There's a lot of helpful tools in the marketplace, but I'm a newbie in town...
mnakalay replied on at Permalink Reply
mnakalay
I often use Jquery Validation Engine (https://github.com/posabsolute/jQuery-Validation-Engine) because it is powerful and easy to use but also because I like the way it looks.

All you have to do is load 2 javascript files (you can concatenate them into one) and one css file and add the appropriate classes to your form field.
biz0087 replied on at Permalink Reply
Remo & Mnakalay,

Here's the problem I'm really having difficult in C5...

I need a way to apply a unique ID for every control on the page in C5

For example, here is the current "Sign Up" button on the homepage...

<!--
<img border="0" class="ccm-image-block" alt="" src="/files/9313/5932/6725/merchsign.png" width="150" height="40" >
-->


We need this....(see the id)

<!--
<img border="0" class="ccm-image-block" id="myUniqueName" alt="" src="/files/9313/5932/6725/merchsign.png" width="150" height="40">
-->




I need unique ID's for ALL OF THE FORM ELEMENTS. The script that I've build talks to everything
mnakalay replied on at Permalink Reply
mnakalay
I think when you use C5 helper to create your form fields, the name you give each field is automatically used as an ID as well so since names are unique, IDs will be unique as well.