Jump to content


Need to modify the add view

add view modify

  • Please log in to reply
7 replies to this topic

#1 r00tkiit

r00tkiit

    Member

  • Members
  • PipPip
  • 14 posts

Posted 30 June 2012 - 11:17 AM

Hi Guys.

This is my first post here. Already inlove with Grocery Crud.

I want to make some modification with the "ADD" view. Please help me out.

I want something like this: http://prntscr.com/bcljp

Here, the first coulmn fields belong to the same column in the database.

Thanks.

#2 fdias

fdias

    grocery CRUD Addict

  • Members
  • PipPipPip
  • 93 posts

Posted 01 July 2012 - 01:15 AM

If you use the default (flexigrid) theme then you can edit the files below:

assets\grocery_crud hemes\flexigrid\views\add.php
assets\grocery_crud hemes\flexigrid\views\edit.php

Cheers

#3 r00tkiit

r00tkiit

    Member

  • Members
  • PipPip
  • 14 posts

Posted 01 July 2012 - 12:01 PM

If you use the default (flexigrid) theme then you can edit the files below:

assets\grocery_crud hemes\flexigrid\views\add.php
assets\grocery_crud hemes\flexigrid\views\edit.php

Cheers

I dont want to change each and every view like above. I only want 1-2 views like I mentioned above.

#4 fdias

fdias

    grocery CRUD Addict

  • Members
  • PipPipPip
  • 93 posts

Posted 01 July 2012 - 04:45 PM

I'm afraid there's no easy way of doing this. web-johnny please correct me if I'm wrong, but I believe you would need to change the function
showAddForm()
of the grocery_crud.php library (around line 1456) and have a condition before you call
$this->_theme_view('add.php',$data);
in order to call your custom add views.

#5 r00tkiit

r00tkiit

    Member

  • Members
  • PipPip
  • 14 posts

Posted 01 July 2012 - 05:45 PM

I'm afraid there's no easy way of doing this. web-johnny please correct me if I'm wrong, but I believe you would need to change the function

showAddForm()
of the grocery_crud.php library (around line 1456) and have a condition before you call
$this->_theme_view('add.php',$data);
in order to call your custom add views.


I can use this by session variables but the problem is how do I achieve the required functionality in my view. Can you please share some sample code with me to achieve my requirement.

#6 r00tkiit

r00tkiit

    Member

  • Members
  • PipPip
  • 14 posts

Posted 01 July 2012 - 06:27 PM

I tried changing the ADD VIEW file myself and I am getting the following result.


Posted Image

2nd dropdown box is buggy. I cant figure out why.

Please suggest me what to do.

#7 fdias

fdias

    grocery CRUD Addict

  • Members
  • PipPipPip
  • 93 posts

Posted 01 July 2012 - 06:48 PM

You need to post your code, just by looking at the images we can only take a wild guess.

#8 Lagluck

Lagluck

    Newbie

  • Members
  • Pip
  • 2 posts
  • LocationBrasil

Posted 27 March 2019 - 06:57 PM

Great, that solved this problem for me...

Thank You!!!! r00tkiit

 

 

 

I'm afraid there's no easy way of doing this. web-johnny please correct me if I'm wrong, but I believe you would need to change the function

showAddForm()
of the grocery_crud.php library (around line 1456) and have a condition before you call
$this->_theme_view('add.php',$data);
in order to call your custom add views.

 







Also tagged with one or more of these keywords: add, view, modify

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users