⚠ In case you've missed it we are migrating to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This forum is read-only and soon will be archived. ⚠

How to Create Fake Fields (a.k.a. Confirm Password) in Enterprise Edition

Fake Fields Confirm Password

  • Please log in to reply
2 replies to this topic

#1 larasmith


    Advanced Member

  • Members
  • PipPipPip
  • 200 posts

Posted 05 June 2017 - 01:27 AM

In the community edition it is allowed to create fake fields which is used in confirm password forms.

How can I implement it in the enterprise edition? Please refer to the console in the photo below for the error.

I tried adding a field in the table named the same as the confirm password field and the error is gone.

I believe there is a better solution for this. I just can't figure it out yet.





#2 larasmith


    Advanced Member

  • Members
  • PipPipPip
  • 200 posts

Posted 08 June 2017 - 11:30 PM

Any ideas in this one? Thanks!

#3 web-johnny


    grocery CRUD Author

  • Administrators
  • 1,166 posts

Posted 10 June 2017 - 08:56 PM

Hello @larasmith,


In Grocery CRUD community, you are allowed to have faked fields, however you can't use it for search, ordering... e.t.c.


In Grocery CRUD Enterprise on the other side, you can use custom Queries in order to achieve that. So that simply means that you have a more powerful tool to use. You will need to use custom models for that. More specifically you will need to use the setModel (instructions at the link) and you will use your own query by extending the getList() with your own needs.


More specifically as you are using Codegniter, you can do something like that:

    public function getList() {

        $order_by = $this->orderBy;
        $sorting = $this->sorting;

        // Your own custom query with a specific select!

        if ($order_by !== null) {
            $this->db->order_by($order_by. " " . $sorting);

        if (!empty($this->_filters)) {
            foreach ($this->_filters as $filter_name => $filter_value) {
                $this->db->like($filter_name, $filter_value);

        if (!empty($this->_filters_or)) {
            foreach ($this->_filters_or as $filter_name => $filter_value) {
                $this->db->or_like($filter_name, $filter_value);

        $this->db->limit($this->limit, ($this->limit * ($this->page - 1)));
        $results = $this->db->get($this->tableName)->result_array();

        return $results;


I also have the code at gist if someone wants a full example of a codeigniter specific model: https://gist.github....ce1fb310fffe02c


Hope that it helped




Also tagged with one or more of these keywords: Fake Fields, Confirm Password

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users